🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5047

Re: Question about regrouping of operands

#5047
From: The Invisible Man
Date: Fri, 13 May 1988 12:30
16 lines
1332 bytes
In article <16490001@hpcllz2.HP.COM> walter@hpcllz2.HP.COM (Walter Murray) writes:
)Actually, as I read the proposed standard, ANSI C would seem to
)be _more_strict_ than FORTRAN.  For example, FORTRAN requires the
)expression X+Y+Z to be _interpreted_ as (X+Y)+Z, but explicitly
)permits it to be _evaluated_ as X+(Y+Z), even though the results could
)be different.  The proposed C standard seems to require that, in
)the absence of parentheses, both the interpretation and the 
)evaluation be done left-to-right.  Thus, in C, the expression
)X+Y+Z would have to be evaluated as (X+Y)+Z.

In the absence of parens, X+Y+Z can be evaluated in any order, including
(Z+X)+Y.  Furthermore, if the results are the same, (X+Y)+Z can be
evaluated as X+(Y+Z).  (unless they changed this at the April meeting :-)
-- 
		"Notitiae gratia notitiarum"
				jim (uunet!actnyc!jsb)
Technical Details
Message-ID: <881@actnyc.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!think!ames!ucsd!ucsdhub!esosun!seismo!uunet!actnyc!jsb
References: <16490001@hpcllz2.HP.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!think!ames!ucsd!ucsdhub!esosun!seismo!uunet!actnyc!jsb
From: jsb@actnyc.UUCP (The Invisible Man)
Newsgroups: comp.std.c
Subject: Re: Question about regrouping of operands
Message-ID: <881@actnyc.UUCP>
Date: 13 May 88 12:30:40 GMT
References: <16490001@hpcllz2.HP.COM>
Reply-To: jsb@actnyc.UUCP (The Invisible Man)
Organization: Diet Software
Lines: 16