[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: undefined compound chaining behavior
From: |
Hossein Sajjadi |
Subject: |
Re: undefined compound chaining behavior |
Date: |
Mon, 9 Jun 2014 21:47:32 +0330 |
"Except where noted, evaluations of operands of individual
operators and of subexpressions of individual expressions are
unsequenced.
Given any two evaluations A and B, if A is sequenced before B, then
the execution of A shall precede the execution of B. If A is not
sequenced before B and B is not sequenced before A, then A and
B are unsequenced. [ Note: The execution of unsequenced evaluations
can overlap. — end note] §1.9"(ISO International Standard ISO/IEC
14882:2011(E) -- Programming Language C++)
For example in expression a + b the standard imposes no requirement if
a evaluated first or b.
so evaluation of expression a=1;a+=a+=4 due to above and other
specifications in §1.9 of standard.
But "the Java programming language guarantees that the operands of
operators appear
to be evaluated in a specific evaluation order , namely, from left to
right.§1.5"(The Java® Language Specification Java SE 8 Edition)
so a=1;a+=a+=4; in Java programming language well defined.
Octave has no standard, so evaluation of expressions can be in any order
- Re: undefined compound chaining behavior, Rik, 2014/06/06
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/06
- Re: undefined compound chaining behavior, Daniel J Sebald, 2014/06/09
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/09
- Re: undefined compound chaining behavior,
Hossein Sajjadi <=
- Re: undefined compound chaining behavior, Mike Miller, 2014/06/09
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/09
- Re: undefined compound chaining behavior, Mike Miller, 2014/06/09
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/10
- Re: undefined compound chaining behavior, Ben Abbott, 2014/06/10
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/10
- Re: undefined compound chaining behavior, Mike Miller, 2014/06/10
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/10
- Re: undefined compound chaining behavior, Mike Miller, 2014/06/10
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/10