Re: Creating Menu Items from NSMutableArray (but now wildly offtopic)
Re: Creating Menu Items from NSMutableArray (but now wildly offtopic)
- Subject: Re: Creating Menu Items from NSMutableArray (but now wildly offtopic)
- From: Simon Stapleton <email@hidden>
- Date: Sat, 17 Aug 2002 16:44:11 +0200
From: Andrew Pinski <email@hidden>
Subject: Re: Creating Menu Items from NSMutableArray
To: email@hidden (Kyle Moffett)
Date: Fri, 16 Aug 2002 19:23:31 -0400 (EDT)
Cc: email@hidden, email@hidden (Ryan Hale)
A basic C error. The 'int index;' needs to come with all the other
variable declarations at the beginning of the function or block.
It is not a basic C error, it is basic pre-C99 error.
You should be glad this has changed for C99.
Hmmm. The only bonus I see from the 'declare anywhere' thing is the
ability to define loop control variables in the loop statement (i.e.
`for (int i = 0;;)`) -everywhere else I've seen it used it tends to
obfuscate what variables are being used.
Stylistic thing, I guess, and probably stemming from years of C
programming
Even in C++, I tend to declare all the variables at the top of the
block. Maybe I should upgrade to COBOL ;-)
Simon
--
PGP Key Id : 0x50D0698D
--
How's the building work going? Do we have a viable crapper yet? Check
it out at :
<
http://www.tufty.co.uk/Move/index.html>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.