Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
int number = 17;

final int authnum = get();
number = ((31 * (number + 1)) * authnum) + (authnum > threshold[0]? 0 : -2);


Exceptions

EXP08EXP05-EX0: The postfix increment and postfix decrement operators (++ and --) assign a new value to a variable and then subsequently read it. These are well-understood and are an exception to the rule against reading memory that was written in the same expression.

EXP08EXP05-EX1: The logical operators || and && have well-understood short-circuit semantics, so expressions involving these operators may violate this rule. Consider the following code:

...

CERT C Secure Coding Standard

EXP30-C. Do not depend on order of evaluation between sequence points

CERT C++ Secure Coding Standard

EXP30-CPP. Do not depend on order of evaluation between sequence points

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="40432e89dc52ea3d-6c2e87a1-434042a0-9840b2ac-e049c31ca44d1799d4c1f411"><ac:plain-text-body><![CDATA[

[ISO/IEC TR 24772:2010

http://www.aitcnet.org/isai/]

"Side?effects and Order of Evaluation [SAM]"

]]></ac:plain-text-body></ac:structured-macro>

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="5bbf09da25e97715-6a892f3b-42c1402b-a825b03b-b65c62e8e1dcf2466bc807b6"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. Bibliography#JLS 05]]

[§15.7, "Evaluation Order"

http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.7]

]]></ac:plain-text-body></ac:structured-macro>

 

§15.7.3, "Evaluation Respects Parentheses and Precedence"

...