Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added exception for algebraic expressions

...

Code Block
bgColor#ccccff
(x & 1) == 0

Exceptions

EXP00-EX1: Mathemtical expressions that follow algebraic order do not require parentheses. For instance, in the expression:

Code Block

x + y * z

the multiplication is performed before the addition by mathematical convention. Therefore parenthesis to enforce this would be redundant.

Code Block
bgcolore#ffcccc

x + (y * z)

Risk Assessment

Mistakes regarding precedence rules may cause an expression to be evaluated in an unintended way. This can lead to unexpected and abnormal program behavior.

...