Introduction
Design Issues
Forms
Precedence
Operators
Notations
Evaluation
Side Effects
Overloading
Precedence and associativity

The operator precedence rules for expression evaluation define the order in which adjacent (separated by at most one operand) operator of different precedence levels are evaluated.

Standard precedence level:
  • Parenthesis
  • Unary operators
  • ** (if the language supports it)
  • /
  • + -
The operator associativity rules for expression evaluation define the order in which adjacent operators with the same precedence level are evaluated.

Standard associativity rules:

Left to right, except **, which is right to left. Precedence and associativity rules can be overridden by parenthesis.

Arithmetic Expressions SCLM - CS 561 - Team 1