From: utzoo!decvax!harpo!npoiv!npois!houxm!houxa!houxi!houxz!ihnp4!ixn5c!inuxc!pur-ee!uiucdcs!emrath
Newsgroups: net.unix-wizards
Title: Re: Multiple statements in C macros: C s - (nf)
Article-I.D.: uiucdcs.1306
Posted: Fri Jan  7 04:29:55 1983
Received: Mon Jan 10 02:08:38 1983

#R:vax1:-27300:uiucdcs:13700014:000:400
uiucdcs!emrath    Jan  7 02:48:00 1983

This response is probably unwarranted, but...
the syntax for the if statement is:
	if (expr) statement else statement
If you declare a macro as a compound (or simple, for that matter) statement,
then use it as if it were one. The following prog works just fine, thank you!


	#define groucho  {i++;printf("i=%d\n",i);}
	main(){ int i=0;
	for (;;) if (i < 10) groucho else break;
	printf("blech\n");}