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: 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 > 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.