ANSI Standards

Stephen Clamage steve at taumet.com
Fri Apr 5 02:28:35 AEST 1991


jseymour at medar.com (James Seymour) writes:

>1) We've been using the K&R format for function definitions... The K&R
>   Second Edition states that the original K&R form will be supported
>   at least during the "transition period".  Does the ANSI standard
>   eliminate the original K&R format (eventually)?

Yes.  Non-prototype declarations are called "obsolescent" meaning that
they may be illegal at some future time.

>2) Parenthesis are not required for return statements, but according to
>   the Second Edition K&R work, they are, and will remain, acceptable.

The return keyword is optionally followed by an expression, and finally
by a semicolon.  No expression can contain a semicolon.  Adding
parentheses around an expression makes it neither more nor less an
expression.  The parens are not part of the return statement syntax.
They are redundant, not required, and not forbidden.  I don't know why
this keeps coming up.

-- 

Steve Clamage, TauMetric Corp, steve at taumet.com



More information about the Comp.lang.c mailing list