92
Chapter 5: ActionScript Core Language Elements
See also
& (bitwise AND)
,
^ (bitwise XOR)
,
^= (bitwise XOR assignment)
,
| (bitwise OR)
,
|=
(bitwise OR assignment)
,
~ (bitwise NOT)
() (parentheses)
Availability
Flash Player 4.
Usage
(expression1 [, expression2])
(
expression1, expression2
)
function
(
parameter1,..., parameterN
)
Parameters
expression1, expression2
Numbers, strings, variables, or text.
function
The function to be performed on the contents of the parentheses.
parameter1...parameterN
A series of parameters to execute before the results are passed as
parameters to the function outside the parentheses.
Returns
Nothing.
Description
Operator; performs a grouping operation on one or more parameters, performs sequential
evaluation of expressions, or surrounds one or more parameters and passes them as parameters to
a function outside the parentheses.
Usage 1: Controls the order in which the operators execute in the expression. Parentheses override
the normal precedence order and cause the expressions within the parentheses to be evaluated
first. When parentheses are nested, the contents of the innermost parentheses are evaluated before
the contents of the outer ones.
Usage 2: Evaluates a series of expressions, separated by commas, in sequence, and returns the
result of the final expression.
Usage 3: Surrounds one or more parameters and passes them as parameters to the function
outside the parentheses.
For more information, see
“Operator precedence and associativity” on page 32
.
Example
Usage 1: The following statements show the use of parentheses to control the order in which
expressions are executed (the value of each expression is written to the log file):
trace((2+3)*(4+5));//writes 45
trace(2+(3*(4+5)));//// writes 29
trace(2+(3*4)+5);// writes 19
Содержание FLEX-FLEX ACTIONSCRIPT LANGUAGE
Страница 1: ...Flex ActionScript Language Reference...
Страница 8: ......
Страница 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Страница 76: ......
Страница 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Страница 135: ...case 135 See also break default strict equality switch...
Страница 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Страница 229: ...while 229 i 3 The following result is written to the log file 0 3 6 9 12 15 18 See also do while continue for for in...
Страница 808: ...808 Chapter 7 ActionScript for Flash...
Страница 810: ...810 Appendix A Deprecated Flash 4 operators...
Страница 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Страница 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Страница 822: ...822 Index...