On Thu, Apr 24, 2008 at 9:26 PM, Herb Petschauer <[EMAIL PROTECTED]> wrote:
> Yes, good point.  I _thought_ there was a good example of why to use
>  the while false pattern but it's so far back in time that I can't
>  recall it.  The only thing that I can find is
>  <http://c-faq.com/cpp/multistmt.html> which really doesn't apply in
>  this example.
>
>  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.

Mike
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to