On Mon, 11 Aug 2003, Sottek, Matthew J wrote:

>    if(foo)
>      DEBUG_PRINT("Foo!\n");
>
> works great for 100 years until someone recodes the DEBUG_PRINT
> macro to be 2 lines.

Then those "someone" shouldn't be allowed near a macro system.

This is the standard trick:

#define DEBUG_PRINT(x) do { \
   stmt1; \
   stmt2; \
 } while (0)

-Peter


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to