return expr and Decus-C

ajs at hpfcla.UUCP ajs at hpfcla.UUCP
Wed May 16 09:59:00 AEST 1984

> return expr;
> is preferable to
> return(expr);
> since the latter looks like a function call (which it is not).

Unless, of course, expr is more complicated than the null string, in which
case parentheses are a very nice way to set it apart.  But seriously...

	RETURN(3)		Parody Systems			RETURN(3)

	   return -- return from C procedure call

	   void return (value)
	   anytype value;

	   This  procedure  never  returns to the  caller.  Instead,  it
	   casts the given  value to the  procedure  type of the calling
	   procedure,  without loss of size or accuracy.  Then it causes
	   the user  program  to  continue  immediately  after the place
	   where the calling  procedure was itself  called.  The calling
	   procedure  appears  to  return  value  to  its  caller  as  a
	   constant of the proper type, should the caller care to use it
	   in an expression (including a simple assignment).

	   The value parameter is optional and may be omitted.

	   If a  procedure  ends  without  calling  return()  first, the
	   operating system calls it for you with no parameters.


	   Due to a bug in the compiler,  this  procedure  can be called
	   without placing parentheses around its parameter.

More information about the Comp.lang.c mailing list