On Arnold's challenge & Paul's Observation... - reordering
On (Sat, 29 Nov 2008 13:40:31 -0600) Gabriel Dos Reis wrote:
> On Fri, Nov 28, 2008 at 2:23 PM, Ian McIntosh <ianm@xxxxxxxxxx> wrote:
>> No, the C and Fortran standards both say the order of a+b+c is unspecified.
>
> You are probably talking of the order of evaluation of operands (or
> arguments). That is entirely different from the association of operands.
I believe Fortran uses operator precedence (other than via parenteses)
strictly for parsing purposes, and NOT for evaluation order.
See Van Snyder's post of Fri, 28 Nov 2008 14:40:27 -0800 where he quotes
a paragraph that appears in both Fortran77 and the draft 2008 standard:
Once the interpretation of a numeric intrinsic operation is
established, the processor may evaluate any mathematically
equivalent expression, provided that the integrity of parentheses
is not violated.
Rules may be different for C and C++.
Michel.
Sent: 2008-11-29 19:54:44 UTC