[Contents] [Prev] [Next] [Index] [Report an Error]

Arithmetic Operations

The arithmetic operations are multiply (*), divide (/), modulo (%), add (+), and subtract (-). Multiply, divide, and modulo are equal in precedence, but each has a higher precedence relative to add and subtract. Add and subtract are equal in precedence.

Example

<# 4 % 3 + 12 - 6 #>The result is 7

When a local variable with a string value is used with arithmetic operators, the value is temporarily converted to an integer equal to the length in characters of the string value. You can use the env.atoi commands to avoid this situation.


[Contents] [Prev] [Next] [Index] [Report an Error]