Previous: Typecasts To the Table of Content Next: Statements

- 2.2.8.6 -
TMT Pascal Language Description
Pascal Language Structure
Expressions

Operator Precedence

For expressions with three or more operands (i.e. 2 - 244 / 4), rules of precedence apply. The order of precedence for operators is listed from highest to lowest:
Operator TypeOperator
Unary Operators@, Not
Multiplying Operators*, /, Div, Mod, And, Shl, Shr
Adding Operators+, -, Or, Xor
Relational Operators=, <>, <, >, <=, >=, In
Operations are performed from left to right while operations of higher precedence are performed first. For instance, the following expression:
  7 + 4 * 2
is not the same as:
  (7 + 4) * 2
Since multiplication has a higher precedence than addition, multiplication is performed first followed by addition. Use parenthesis to separate operations that you want to be performed first.


Previous: Typecasts To the Table of Content Next: Statements
Typecasts Table of Content Statements

- 2.2.8.6 -