Operators are assigned a precedence level to eliminate any ambiguity concerning the order by which the expressions are evaluated. For example, without precedence, the expression '5+2*3' could be 21 or 11, depending on which operation you performed first. In RoBOTL, multiplication is of higher precedence than addition, so it would multiply '2*3' to get 6 and then add 5 to get 11. In order to get 21, you would have to add parenthesis to make '5+2' a parenthetical subexpression, i.e. '(5+2)*3', which would add '5+2' to get 7 and then multiply by 3 to get 21.
Expressions containing operators within the same precedence level are evaluated simply left to right, i.e. '5+2+3' is the same as '(5+2)+3'.
You can also go:
Created on 5 January 1996
Last revised 27 January 1997