return expr and Decus-C - (nf)

ks at ecn-ee.UUCP ks at ecn-ee.UUCP
Mon May 14 12:17:46 AEST 1984

ecn-ee!ks    May 13 20:44:00 1984

> Of course the examples aren't legal C, but that's not the
> point.  The question is, if you are worried that
> 	return (expr);
> looks like a function call, why aren't you worried that
> 	while (expr) stat;
> also looks like a function call?  (Remember that 'stat'
> can be the null statement.)  Aren't you being just a bit
> inconsistent?
> -- 
> 	Alan S. Driscoll
> 	AT&T Bell Laboratories

Personally, my perferred style avoids confusion.
If a keyword is followed by a '(', I seperate them by a space.
looks like a function call, but
	while (expr)
does not.
Clear style is up to the programmer.
Function calls should "look" like function calls,
macros should look like function calls, but
"return"s should not look like function calls.

				Kirk Smith
				Purdue EE

More information about the Comp.lang.c mailing list