# Arithmetic operators and expressions

In order to use arithmetic expressions you must first select the Enable support for variables and arithmetic expressions check box on the Variables and Types tab of the macro properties in the VME or select the Use Variables and Arithmetic Expressions in Macro check box on the Macro tab of the AME. For more information, see Representation of strings and non-alphanumeric characters).

The arithmetic operators are shown in Table 1.

Operator | Operation |
---|---|

+ | Addition |

- | Subtraction |

* | Multiplication |

/ | Division |

% | Modulo |

In an arithmetic expression the terms are evaluated left to right.
The order of precedence of the operators is: *, /, %, +, -. For example,
the result of the following expression is 8:

`4 * 2 + 16 / 8 - 1 * 2`

You
can use parentheses to indicate the order in which you want expressions
to be evaluated:
```
(4 * 2) + (16 / 8) - (1 * 2) evaluates to 8
but
4 * (( 2 + 16) / (8 - 1)) * 2 evaluates to 20.571
```