Script expressions
Order of operations
When you evaluate conditional expressions, the expression with the highest
precedence (importance) is evaluated first, then the one with the second highest
precedence, and through to the expression with the lowest precedence.
When expressions appear more than once, or when two expressions with equal
importance appear in the same expression, they are evaluated from left to right.
Expressions in conditional expressions are evaluated in the following order:
parentheses ( )
multiplication * and division /
addition + and subtraction –
comparison expressions =, < >, >, <, > =, < =
logical expressions NOT, AND, OR
left to right
The expression NOT has precedence over the AND and OR expressions.
If an expression contains parentheses, the partial expression within the
parentheses is resolved first. Then multiplications are resolved, followed by
additions, subtractions, comparison expressions, logical expressions, and left to
right.
Example
Compare the results of the following calculations that have the parentheses in
different places:
2 * 3 + 2 * 3 = 12
2 * (3 + 2 * 3) = 18
(2 * 3 + 2) * 3 = 24
(2 * 3) + (2 * 3) = 12
464
Standard 8.04
Contact Center Manager