[Mono-list] Style

Dietmar Maurer dietmar@ximian.com
01 Mar 2002 17:44:10 +0100


On Fri, 2002-03-01 at 17:32, Radek Doulík wrote:

> #define MY_MACRO \
> 	foo (); \
> 	bar ()
> 
> if (x)
> 	MY_MACRO;

I would never define a macro that way. Instead use something like:

#define do { foo(); bar (); } while (0)

and you will never have such problems.

- Dietmar