Introduction
Design Issues
Forms
Precedence
Operators
Notations
Evaluation
Side Effects
Overloading
|
Different ways of writing expressions
Three different but equivalent ways of writing expressions are:
- Infix notation: X + Y
- Operators are written in-between their operands. This is the normal way we write expressions.
- Postfix notation: X Y +
- Operators are written after their operands.
- Prefix notation: + X Y
- Operators are written before their operands.
|