Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: formatting

...

Code Block
bgColor#ccccff
langc
if (a == b) {
  /* ... */
}

Compliant Solution

When the assignment is intended, the following is an alternative compliant solution:

...

Code Block
bgColor#FFcccc
langc
 do { /* ... */ } while ( foo(), x = y ) ;

Compliant Solution

When the assignment of y to x is not intended, this conditional block is now executed when x is equal to y:

...

Code Block
bgColor#FFcccc
langc
 do { /* ... */ } while ( x = y, p = q ) ;

Compliant Solution

This is a compliant example because the expression x = y is not used as the controlling expression of the while statement:

...