| Applying science to business management |
  
Operator Precedence
When an expression contains two or more operators, normal
operator precedence rules are applied to determine the order of
evaluation. If two operators have different levels of precedence,
the operator with the highest precedence is evaluated first.
For example, multiplication is of higher precedence than
addition, so the expression 2+3*4
is evaluated as
3 * 4 = 12
2 + 12 = 14
The evaluation order can be explicitly controlled using
parentheses; e.g., (2+3)*4 is
evaluated as
2 + 3 = 5
5 * 4 = 20
Operators in the previous table are presented in groups from
highest to lowest precedence.
|