From: utzoo!decvax!genradbo!wjh12!clp
Newsgroups: net.lang.c
Title: Re: Multiple-statement macros
Article-I.D.: wjh12.150
Posted: Wed Jan 26 16:16:02 1983
Received: Sat Jan 29 09:12:59 1983
References: unc.4482

I just wanted to comment that in writing an interpreter, I have been
 writing C functions which I plan to later convert into macros for speed
 (in-line code). This ends up with some macros like:

#define	newMtdCx(clPtr)	{
			    OBJPTR  newContext = makeContext();

			    ...code which uses newContext many times...
			}
(where I've left out the '\'s necessary at the end of each line but the last)

In cases where declarations are needed (e.g., and exchange routine), commas
 are not good enough for multiple statements... I've had to put surrounding
 braces in all the if portions of if...else pairs to be safe.
							     Charles L. Perkins
						    ...decvax!genradb!wjh12!clp