Flash Lite 1.x ActionScript Language Reference |
|
|
|
| Flash Lite Operators > += (addition assignment) | |||
Flash Lite 1.0.
expression1+=expression2
expression1, expression2 Numbers or strings.
Operator (arithmetic compound assignment); assigns expression1 the value of expression1 + expression2. For example, the following two statements have the same result:
x += y;x = x + y;
All the rules of the addition (+) operator apply to the addition assignment (+=) operator.
The following example uses the addition assignment (+=) operator to increase the value of x by the value of y:
x = 5;
y = 10;
x += y;
trace(x); // output: 15
|
|
|
|