• 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: NSLog() replacement for debugger output
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSLog() replacement for debugger output


  • Subject: Re: NSLog() replacement for debugger output
  • From: "Herb Petschauer" <email@hidden>
  • Date: Thu, 24 Apr 2008 21:36:43 -0700

On 24/04/2008, Michael Ash <email@hidden> wrote:
>  >  Ah well, I know I've been burned by this but it may have just been a
>  >  by product of using it for a different kind of macro under a different
>  >  compiler.
>
>
> It's only useful for multi-statement macros. The idea is that a macro
>  looks like a single statement so it should act like one, and
>  do/while(0) is the only way in C to transform a sequence of statements
>  into a single statement. If your macro is already a single statement
>  then it doesn't do anything particularly interesting.

I think ultimately I must have gotten burned by the mult-statement
aspect of it (my ASSERT and LOG macros are rarely one line these days)
and it just became ritual (and ritual becomes law and the true reasons
are forgotten).  Good to re-examine these things and realize that yes,
I'm am on schedule for becoming a grumpy curmudgeon ;-)

Sorry for the noise.

Cheers,
-H.
_______________________________________________

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

References: 
 >NSLog() replacement for debugger output (From: Don Arnel <email@hidden>)
 >Re: NSLog() replacement for debugger output (From: Mohsan Khan <email@hidden>)
 >Re: NSLog() replacement for debugger output (From: Mohsan Khan <email@hidden>)
 >Re: NSLog() replacement for debugger output (From: Don Arnel <email@hidden>)
 >Re: NSLog() replacement for debugger output (From: "Herb Petschauer" <email@hidden>)
 >Re: NSLog() replacement for debugger output (From: Ken Thomases <email@hidden>)
 >Re: NSLog() replacement for debugger output (From: "Herb Petschauer" <email@hidden>)
 >Re: NSLog() replacement for debugger output (From: "Michael Ash" <email@hidden>)

  • Prev by Date: Re: NSLog() replacement for debugger output
  • Next by Date: Re: Core Animation Deadlock
  • Previous by thread: Re: NSLog() replacement for debugger output
  • Next by thread: Re: NSLog() replacement for debugger output
  • Index(es):
    • Date
    • Thread