Operator precedence
All operators have the same precedence, which is controlled by the lack of whitespace between the operands.
In the above example, the lack of whitespace between 1
, +
and 2
, classifies the operation as a distinct expression.
The implications are the following:
When no precedence is defined, the order of operations is from left to right:
On the other hand, when too much precedence is defined, the order is from right to left:
The precedence can also be controlled by backslashing or preceding the operator with a dot.
Last updated