return expr and Decus-C

Doug Gwyn gwyn at brl-vgr.ARPA
Fri May 11 20:54:30 AEST 1984


Yes,
	( expr )
is also an
	expr
which is why
	return( expr );
is legal although the definition is
	return expr;
However, stylistically I recommend leaving unnecessary parentheses off
the return expr since, as I said, they make it look like a function call.
Both ways are legal and this wouldn't be an important issue except that
some C compilers (apparently the DECUS C compiler) do not accept the
more general form.



More information about the Comp.lang.c mailing list