, (comma)
Availability
Flash Lite 1.0.
Usage
expression1, expression2
Operands
expression1, expression2
Description
Operator; evaluates
expression1
Example
The following example uses the comma (,) operator without the parentheses
illustrates that the comma operator returns only the value of the first expression without the
parentheses
operator:
()
v = 0;
v = 4, 5, 6;
trace(v); // output: 4
The following example uses the comma (
illustrates that the comma operator returns the value of the last expression when used with the
parentheses
operator:
()
v = 0;
v = (4, 5, 6);
trace(v); // output: 6
The following example uses the comma (
illustrates that the comma operator sequentially evaluates all of the expressions but returns the
value of the first expression. The second expression,
1.
v = 0;
z = 0;
v = v + 4 , z++, v + 6;
trace(v); // output: 4
trace(z); // output: 1
84
Flash Lite Operators
Numbers or expressions that evaluate to numbers.
, then
expression2
) operator with the parentheses
,
) operator without the parentheses
,
z++
, and returns the value of
()
, is evaluated and
z
.
expression2
operator and
()
operator and
operator and
()
is incremented by
Need help?
Do you have a question about the FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?