CS 3304: Comparative Languages
Arithmetic Expressions
[
Course Documents
] : [
Arithmetic Expressions
]
Previous
Contents
Next
Keyword Index
Operator Associativity
The
operator associativity rules
for expression evaluation define the order in which adjacent operators with the same precedence level are evaluated
Typical associativity rules:
Left to right, except **, which is right to left
Sometimes unary operators associate right to left (e.g., FORTRAN)
APL is different; all operators have equal precedence and all operators associate right to left
Can be overridden with parentheses