Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This expression is OK because the <a href="http://en.wikipedia.org/wiki/Comma_operator" rel="nofollow noreferrer">comma operator</a> is a <a href="http://en.wikipedia.org/wiki/Sequence_point" rel="nofollow noreferrer">sequence point</a>:</p> <pre><code>(i++, ++i, j*i) </code></pre> <p>However do not confuse it with the following where the comma is not acting as a sequence point:</p> <pre><code>somefunction(i++, ++i, j*i) </code></pre> <hr> <blockquote> <p>What about j = i++ * ++i </p> </blockquote> <p>The multiplication operator is not a sequence point.</p> <hr> <p>(<em>Excuse me hijacking your answer</em>)</p> <p>From §3.4 of ISO 9899:1999 (C Standard):</p> <blockquote> <h3>3.4 behavior</h3> <p>external appearance or action</p> <h3>3.4.1 implementation-defined behavior</h3> <p>unspecified behavior where each implementation documents how the choice is made</p> <p>EXAMPLE An example of implementation-defined behavior is the propagation of the high-order bit when a signed integer is shifted right.</p> <h3>3.4.2 locale-specific behavior</h3> <p>behavior that depends on local conventions of nationality, culture, and language that each implementation documents</p> <p>EXAMPLE An example of locale-specific behavior is whether the islower function returns true for characters other than the 26 lowercase Latin letters.</p> <h3>3.4.3 undefined behavior</h3> <p>behavior, upon use of a nonportable or erroneous program construct or of erroneous data, for which this International Standard imposes no requirements</p> <p>NOTE Possible undefined behavior ranges from ignoring the situation completely with unpredictable results, to behaving during translation or program execution in a documented manner characteristic of the environment (with or without the issuance of a diagnostic message), to terminating a translation or execution (with the issuance of a diagnostic message).</p> <p>EXAMPLE An example of undefined behavior is the behavior on integer overflow.</p> <h3>3.4.4 unspecified behavior</h3> <p>behavior where this International Standard provides two or more possibilities and imposes no further requirements on which is chosen in any instance</p> <p>EXAMPLE An example of unspecified behavior is the order in which the arguments to a function are evaluated.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload