• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Reaching the limits of 'learn by example'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Reaching the limits of 'learn by example'


  • Subject: RE: Reaching the limits of 'learn by example'
  • From: Jens Baumeister <email@hidden>
  • Date: Mon, 14 May 2001 18:14:57 +0200

> -----Original Message-----
> From: Stefan Arentz [mailto:email@hidden]

> On Sun, May 13, 2001 at 11:51:58PM +0200, Cyril Godefroy wrote:

> > PS:
> > Brian Hill just told me I can't do what I did while I was
> writing those
> > lines. How come I can't? (And yes, I usually use a so-called object
> > oriented language where I usually can do that kind of stuff).
>
> That's just a (silly) C rule. Every language has it's own
> rules, and even
> though some languages look alike (i guess you talk about
> java), there are
> details that are different.

More specifically, this C rule states that local variables must be declared
at the beginning of a block. Coming from Java as well, it took me a while to
figure out that I didn't have to delare all my stuff at the beginning of the
method - any block surrounded by { and } will do. Note that the variables'
scope is only inside the block it's declared in, of course.

_____________________________________
Jens Baumeister
Bullex GmbH, Cologne, Germany

She sells c-shells by the sea shore.


  • Follow-Ups:
    • Re: Reaching the limits of 'learn by example'
      • From: Clyde McQueen <email@hidden>
  • Prev by Date: Re: Newbie Question: Multidimensional NSMutableArray Creation
  • Next by Date: Best way to authenticate ?..
  • Previous by thread: Re: Reaching the limits of 'learn by example'
  • Next by thread: Re: Reaching the limits of 'learn by example'
  • Index(es):
    • Date
    • Thread