Possible Duplicate:
What’s the use of do while(0) when we define a macro?
Why do people use
do { statement1; statement2; statement3; etc; } while(0);
instead of the shorter form
{stmt1; stmt2; stmt3; etc; }
in C multi-line macros?
Possible Duplicate:
What’s the use of do while(0) when we define a macro?
Why do people use
do { statement1; statement2; statement3; etc; } while(0);
instead of the shorter form
{stmt1; stmt2; stmt3; etc; }
in C multi-line macros?