Operators > () (parentheses)
() (parentheses)Syntax
(
expression1, expression2
);
function
(
functionCall1, ..., functionCallN
);
Arguments
expression1, expression2
Numbers, strings, variables, or text.
function
The function to be performed on the contents of the parentheses.
functionCall1...functionCallN
A series of functions to execute before the result is passed to the function outside the parentheses.
Description
Operator (general); performs a grouping operation on one or more arguments, or surrounds one or more arguments and passes the results a parameter to a function outside the parentheses.
Usage 1: Performs a grouping operation on one or more expressions to control the order of execution of the operators in the expression. This operator overrides the automatic precedence order, and causes the expressions within the parentheses to be evaluated first. When parentheses are nested, Flash evaluates the contents of the innermost parentheses before the contents of the outer ones.
Usage 2: Surrounds one or more arguments and passes them as parameters to the function outside the parentheses.
Player
Flash 4 or later.
Example
(Usage 1) The following statements illustrate the use of parentheses to control the order of execution of expressions. (The result appears below each statement.)
(2 + 3) * (4 + 5)
45
2 + (3 * (4 + 5))
29
2 + (3 * 4) + 5
19
(Usage 2) The following example illustrates the use of parentheses with a function:
getDate(); invoice(item, amount);
See also
with