150
ActionScript language elements
Returns
Boolean
- The result of the comparison.
See also
>= greater than or equal to operator
++ increment operator
++
expression
expression
++
A pre-increment and post-increment unary operator that adds 1 to
expression
. The
expression
can be a variable, element in an array, or property of an object. The pre-
increment form of the operator (
++expression
) adds 1 to
expression
and returns the
result. The post-increment form of the operator (
exp+
) adds 1 to
expression
and
returns the initial value of
expression
(the value prior to the addition).
The pre-increment form of the operator increments
x
to 2 (
x + 1 = 2
) and returns the result
as
y
:
var x:Number = 1;
var y:Number = ++x;
trace("x:"+x); //traces x:2
trace("y:"+y); //traces y:2
The post-increment form of the operator increments
x
to 2 (
x + 1 = 2
) and returns the
original value of
x
as the result
y
:
var x:Number = 1;
var y:Number = x++;
trace("x:"+x); //traces x:2
trace("y:"+y); //traces y:1
Availability:
ActionScript 1.0; Flash Lite 1.0
Operands
expression :
Number
- A number or a variable that evaluates to a number.
Returns
Number
- The result of the increment.
Summary of Contents for Flash Lite 2
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...