Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Changed the Exception section into an Applicability section

...

Code Block
bgColor#ccccff
public void f(boolean a, boolean b) {
  while ( (a == b) && flag ) {
    /* ... */
  }
}

Exceptions

Applicability

The use of EXP51:EX0: Using the assignment operator in these controlling conditional expressions frequently indicates programmer error and can result in unexpected behavior.

Exceptionally it is permitted to use the assignment operator in conditional expressions if the expression is permissible if it is not the controlling expression, as shown in the following compliant example:

...