Skip to main content

Operator Precedence

You can combine the arithmetic operators to form complex mathematical expressions. ObjectScript does not have operator precedence rules. Instead, evaluation of an expression proceeds from left to right, without regard for operators, other than parentheses. Complex expressions should always be clarified by using parentheses.

Terminal


USER>set x = 3 + 5 * 6 - 4

USER>write x
44
USER>set x = 3 + ( 5 * 6 ) - 4

USER>write x
29
USER>
Copy code to clipboard
FeedbackOpens in a new window