...
Code Block | ||||
---|---|---|---|---|
| ||||
do { /* ... */ } while ( x = y, p == q ) ; |
Exceptions
EXP18-EXP1EX1: Assignment can be used where the result of the assignment is itself a parameter to a comparison expression or relational expression.
...
Code Block | ||||
---|---|---|---|---|
| ||||
if ( ( x = y ) != 0 ) { /* ... */ } |
EXP18-EXP2EX2: Assignment can be used where the expression consists of a single primary expression.
...
Code Block | ||||
---|---|---|---|---|
| ||||
if ( ( x = y ) ) { /* ... */ } |
EXP18-EXP3EX3: Assignment can be used in the above contexts if it occurs in a function argument or array index.
...