Question on Unary '+' (Was, "Should I convert FORTRAN code to C?")

Peter Shenkin shenkin at cubsun.BIO.COLUMBIA.EDU
Wed Jun 22 00:26:08 AEST 1988


In article <20378 at beta.lanl.gov> jlg at beta.lanl.gov (Jim Giles) writes:
>The proposed ANSI standard for C has unary plus operators.  Among other
>uses, it can force ordering of expression evaluation.  The famous case
>where C doesn't evaluate a+(b+c) in any particular order is fixed by
>doing a+ +(b+c).  The unary plus forces the subexpression to be eval-
>uated before adding the other constant.

Is this still in the standard?  Seems to me I've read several things on
the net recently that implied that it had been removed, and that parentheses
will force order of evaluation in ANSI C.  What is the real situation in
the draft standard?

(I'm familiar with the arguments and motivations on both sides.  I'm not trying
to start a war or an extended discussion such as the one I remember that took
place in this newsgroup about two years ago!  I just want to find out what the 
current situation is!)

	-P.
-- 
*******************************************************************************
Peter S. Shenkin,    Department of Biological Sciences,    Columbia University,
New York, NY   10027         Tel: (212) 280-5517 (work);  (212) 829-5363 (home)
shenkin at cubsun.bio.columbia.edu    shenkin%cubsun.bio.columbia.edu at cuvma.BITNET



More information about the Comp.lang.c mailing list