From: utzoo!decvax!duke!harpo!floyd!cmcl2!edler
Newsgroups: net.unix-wizards,net.lang
Title: Re: if statement ambiguity and the C preprocessor
Article-I.D.: cmcl2.13661
Posted: Thu Sep 23 00:14:34 1982
Received: Thu Sep 23 05:19:01 1982
References: pyuxll.282 rabbit.764



Let me clarify.
The problem (a minor one perhaps) is that I don't want to have
to leave off the semicolon from the invokation of mymacro.
Consider:
	#define mymacro	{ if (e1) s1; }

	if (e2)
		mymacro;
	else
		s2;

This expands to:

	if (e2)
		{ if (e1) s1; };
	else
		s2;

which is syntacticly incorrect.

The only real significance of this is where you want to present
a package for others to use, and you claim that a macro is
a function, when in reality it is not.  As this example shows,
it cannot even be invoked as if it were a function, since
it would be necessary to include the semicolon if it were a real
function.

	Jan Edler		cmcl2!edler	(nyu)
				pyuxll!jse	(btl piscataway)