🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #977

Re: Re: Order of Evaluation (plus ?'s)

#977
From: Walter Murray
Date: Mon, 20 Nov 1989 18:42
21 lines
1342 bytes
Doug Gwyn writes:
> In article <13871@orstcs.CS.ORST.EDU> bailey@jacobs.CS.ORST.EDU.UUCP (Kirk Bailey) writes:
> -I'm curious about the fate of the changed floating point evaluation
> -constraints which were a part of some of the intermediate dpANSI "C" documents;
> -the idea being that the programmer could be assured of a fixed evaluation
> -order without requiring the use of temps.  The current doc's I have seem to
> -no longer mention this (or the synchronization aspect of unary '+')?

> Unary + is no longer the way to do this.  Use parentheses instead.

There are times when the parentheses aren't even needed.  ANSI C guarantees
that
   p = q + r + s;
will behave exactly the same as
   p = (q + r) + s;
In this respect a standard-conforming C compiler will actually have
less latitude than a FORTRAN compiler when it comes to rearranging
expressions.

Walter Murray
----------
Technical Details
Message-ID: <12570034@hpclwjm.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!apple!motcsd!hpda!hpcuhb!hpcllla!hpclisp!hpclwjm!walter
References: <1989Nov18.232326.23711@utzoo.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!apple!motcsd!hpda!hpcuhb!hpcllla!hpclisp!hpclwjm!walter
From: walter@hpclwjm.HP.COM (Walter Murray)
Newsgroups: comp.std.c
Subject: Re: Re: Order of Evaluation (plus ?'s)
Message-ID: <12570034@hpclwjm.HP.COM>
Date: 20 Nov 89 18:42:58 GMT
References: <1989Nov18.232326.23711@utzoo.uucp>
Organization: Hewlett-Packard Calif. Language Lab
Lines: 21