Syntax
unary-expr assignment-op assignment-expr
Remarks
The assignment operators are:
= *= /= %= += -= <<= >>= &= ^= |=
The = operator is the only simple assignment operator, the others are compound assignment operators.
In the expression E1 = E2, E1 must be a modifiable lvalue. The assignment expression itself is not an lvalue.
The expression
E1 op= E2
has the same effect as
E1 = E1 op E2
except the lvalue E1 is evaluated only once. For example, E1 += E2 is the same as E1 = E1 + E2.
The expression's value is E1 after the expression evaluates.
For both simple and compound assignment, the operands E1 and E2 must obey one of the following rules:
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|