2.2.8.5. Typecasts | Table of Contents | 2.2.9. Statements |

2. TMT Pascal Language Description

2.2. Pascal Language Structure

2.2.8. Expressions

2.2.8.6. 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 Type | Operator |
---|---|

Unary Operators | @, Not |

Multiplying Operators | *, /, Div, Mod, And, Shl, Shr |

Adding Operators | +, -, Or, Xor |

Relational Operators | =, <>, <, >, <=, >=, In |

7 + 4 * 2is not the same as:

(7 + 4) * 2Since 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.

2.2.8.5. Typecasts | Table of Contents | 2.2.9. Statements |