The arithmetic operators are provided to enable you to apply arithmetic in your script code.
The arithmetic operators are displayed when you open the Arithmetic operators folder in the Commands list box of the Add Script Field or Update Script Field dialogs, as shown in the following image.
The arithmetic operators are described in the following table.
Operator | Function | When selected, provides… |
---|---|---|
x + y | Add | The addition symbol (+). |
x - y | Subtract | The subtraction symbol (-). |
x * y | Multiply | The multiplication symbol (*). |
x / y | Divide | The division symbol (/). This provides Real division (for example, 7 / 3 = 2.33333333333333). |
x div y | Integer division (with truncation) | Integer division (division with truncation; for example, 7 div 3 = 2). |
x mod y | Modulus (remainder after integer division) | Modulus (remainder after integer division; for example, 7 mod 3 = 1). |