Return statement in C

utzoo!decvax!harpo!seismo!rocheste!mayer utzoo!decvax!harpo!seismo!rocheste!mayer
Thu Oct 28 14:54:15 AEST 1982


Recently I've seen several complaints on the net about the C "return"
statement requiring parentheses.  According to reference manual section
of the Kernighan and Ritchie book (page 203):

	A function returns to its caller by means of the return statement,
	which has one of the forms

		return ;
		return expression ;


No parentheses are required by the language (or by the 4.1 C compiler).
I think the confusion is caused by the examples in the tutorial section
of the book.

					Jim Mayer
					seismo!rochester!mayer
					allegra!rochester!mayer




More information about the Comp.lang.c mailing list