Re: NSLog() replacement for debugger output
Re: NSLog() replacement for debugger output
- Subject: Re: NSLog() replacement for debugger output
- From: Jens Alfke <email@hidden>
- Date: Thu, 24 Apr 2008 20:57:47 -0700
On 24 Apr '08, at 8:09 PM, Michael Ash wrote:
It's only useful for multi-statement macros.
And macros that use an 'if':
extern BOOL gVerboseMode;
#define LOG(X) if(gVerboseMode) NSLog(@"value = %i",X);
...
if( a > 5 )
FOO(a);
else
a = 5;
won't do what you expect, because the 'else' attaches to the 'if' in
the macro.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden