An expression combines values, operators, functions, constants, and variables.
The evaluation of an expression is dependent on the precedence of the mathematical operators.
You can overrule the precedence of the operators by enclosing part of your expression in parentheses.
|
|
( ) ! ² ³ ^ /, *, % +, - =, <>, <, >, <=, >= And, Or, Xor, &, |, ||, >>, << |
'Examples of using expressions
2 + 3 * 4
Ans = 14
(2 + 3) * 4
Ans = 20
1.5 * 2 ^ 2
Ans = 6
(1.5 * 2) ^ 2
Ans = 9
5 * (2 + 3) + 2 ^ (2 + 2)
Ans = 41
(5 + 2 / 3) ^ 2 / (1 + (4 / 2 + 1)) + 3 - 2
Ans = 9.027777777
- 3 ^ 2
Ans = -9
(-3) ^ 2
Ans = 9