Re: [Mesa-dev] off-topic: dumb question about macros

1999-07-08 Thread Keith Whitwell
Brian Paul wrote: > > I've seen this before but I can't recall the reasoning for it. > When defining a multi-statement macro people use this construct: > > #define MY_MACRO(FOO) \ >do {\ > statement1(FOO); \ > statement2(FOO); \ > statemen

Re: [Mesa-dev] off-topic: dumb question about macros

1999-07-08 Thread Simon Pogarcic
On Thu, 8 Jul 1999, Brian Paul wrote: **I've seen this before but I can't recall the reasoning for it. **When defining a multi-statement macro people use this construct: ** **#define MY_MACRO(FOO) \ ** do {\ **statement1(FOO); \ **statement2(FOO); \

[Mesa-dev] off-topic: dumb question about macros

1999-07-08 Thread Brian Paul
I've seen this before but I can't recall the reasoning for it. When defining a multi-statement macro people use this construct: #define MY_MACRO(FOO) \ do {\ statement1(FOO); \ statement2(FOO); \ statement3(FOO); \ } while(0) Why is th