🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c
Article #9525

Re: Expression sequencing query

#9525
From: Henry Spencer
Date: Thu, 09 Oct 1986 20:55
16 lines
1445 bytes
> ... I still believe that it is a pity that C (even Ansi C) does not even
> let the programmer tell it what order is desired by the use
> of parentheses! ...

The problem, as has been mentioned before, is that parentheses are also
used to override the precedence rules for operators.  This is a use in
which one does *not* necessarily want to imply the forcing of evaluation
order.  There really is no entirely satisfactory solution except to use
two different constructs for the two different roles.  C opted long ago
to use parentheses for precedence overrides, and to require explicit
assignment to a temporary to force order of evaluation.  X3J11 has actually
added a few hooks for order control, but changing the meaning of parentheses
for that purpose wasn't considered wise.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,decvax,pyramid}!utzoo!henry
Technical Details
Message-ID: <7210@utzoo.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!henry
References: <760@oakhill.UUCP> <111@titan.UUCP> <468@jc3b21.UUCP>, <160@geac.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!henry
From: henry@utzoo.UUCP (Henry Spencer)
Newsgroups: net.lang.c
Subject: Re: Expression sequencing query
Message-ID: <7210@utzoo.UUCP>
Date: Thu, 9-Oct-86 16:55:15 EDT
Article-I.D.: utzoo.7210
Posted: Thu Oct  9 16:55:15 1986
Date-Received: Thu, 9-Oct-86 16:55:15 EDT
References: <760@oakhill.UUCP> <111@titan.UUCP> <468@jc3b21.UUCP>, <160@geac.UUCP>
Organization: U of Toronto Zoology
Lines: 16
Keywords: Bugs