Skip to main content

IAR Embedded Workbench for RH850 3.20.x

Precedence of assembler operators

In this section:

Each operator has a precedence number assigned to it that determines the order in which the operator and its operands are evaluated. The precedence numbers range from 1 (the highest precedence, that is, first evaluated) to 15 (the lowest precedence, that is, last evaluated).

These rules determine how expressions are evaluated:

  • The highest precedence operators are evaluated first, then the second highest precedence operators, and so on until the lowest precedence operators are evaluated.

  • Operators of equal precedence are evaluated from left to right in the expression.

  • Parentheses ( and ) can be used for grouping operators and operands, and for controlling the order in which the expressions are evaluated. For example, this expression evaluates to 1:

    7/(1+(2*3))