Re: C question for you old guys ;-)
Re: C question for you old guys ;-)
- Subject: Re: C question for you old guys ;-)
- From: Daryn <email@hidden>
- Date: Sun, 8 Jun 2003 20:03:19 -0500
On Sunday, June 8, 2003, at 07:18 PM, Gregory Weston wrote:
On 6/8/03 at 3:09 PM, Marcel Weiher wrote:
true -- i should've just cut-and-pasted it in to mail, but i found
that i had put a semicolon right after the if statement (so obviously
it would 'return nil;' every time!
I've made it a habit ( "coding standard", if you will) to always use
{}
for if, while, for, etc.
I'll second Marcel's implied recommendation. In fact, I _did_ make it
a standard
in my shop. It's good to be the chief. Or at least the shaman.
While I agree, the recommendation is a non sequitur. These both
compile the same, and suffer from the same mistake:
if(spriteInfo == NULL); return nil;
if(spriteInfo == NULL); { return nil; }
Daryn
_______________________________________________
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.