Article View: net.lang.c
Article #9622Re: Expression Sequencing Query
From: Ray Butterworth
Date: Tue, 21 Oct 1986 14:01
Date: Tue, 21 Oct 1986 14:01
18 lines
1300 bytes
1300 bytes
> The ANSI C draft standard provides the unary plus operator for coercing > evaluation order. Thus > a = +(b + c) + +(d) ; > should force the sum of b+c to be calculated and added to d. This is > probably less pleasing to the eye but, as has been pointed out before, > parentheses already have a meaning in C, and it is explicitly NOT one > that forces order of evaluation. Does X3J11 (or any other C "standard") say anything about the order of evaluation of (possibly redundant) cast expressions? e.g. ( ((double)(a+b)) + ((double)(c+d)) ) where a, b, c, and d may or may not be type (double)? It would certainly be prettier than the unary " +" operator, and certainly more obvious that the programmer really did want the given grouping.
Technical Details
Message-ID:
<2809@watmath.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!rbutterworthReferences:
<4711@brl-smoke.ARPA>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watmath.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!rbutterworth From: rbutterworth@watmath.UUCP (Ray Butterworth) Newsgroups: net.lang.c Subject: Re: Expression Sequencing Query Message-ID: <2809@watmath.UUCP> Date: Tue, 21-Oct-86 10:01:49 EDT Article-I.D.: watmath.2809 Posted: Tue Oct 21 10:01:49 1986 Date-Received: Wed, 22-Oct-86 04:11:40 EDT References: <4711@brl-smoke.ARPA> Organization: U of Waterloo, Ontario Lines: 18