Home Online Manual
Top
Back: Major differences to the C programming language
Forward: Evaluation of logical expressions
FastBack: System dependent limitations
FastForward: Miscellaneous oddities
Up: Major differences to the C programming language
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

6.3.1 No rvalue of increments and assignments

The increment operator ++ (resp. decrement operator --) has no rvalue, i.e., cannot be used on the right-hand sides of assignments. So, instead of

 
j = i++;  // WRONG!!!

(which results in an error), it must be written

 
i++; j = i;

Likewise, an assignment expression does not have a result. Therefore, compound assignments like i = j = k; are not allowed and result in an error.