CS 3304: Comparative Languages
Arithmetic Expressions
[
Course Documents
] : [
Arithmetic Expressions
]
Previous
Contents
Next
Keyword Index
Operator Precedence
The
operator precedence rules
for expression evaluation define the order in which "adjacent" operators of different precedence levels are evaluated ("adjacent" means they are separated by at most one operand)
Typical precedence levels
1. parentheses
2. unary operators
3. ** (if the language supports it)
4. *, /
5. +,--
Can be overridden with parentheses