Operators

Most binary operators are the same as in C. Unary operators (e.g. -1) are not supported, so just use (0-n) for negative numbers. Operator precedence is the same as C. You can use parentheses to group expressions.

Operator Meaning
+ and -          
add and subtract
 * and /         
multiply and divide
 !  
Invert or "Not". E.g. !True equals False.
||
logical OR operation
&&
logical AND operation
!=
logical NOT EQUAL operation
==
logical EQUAL operation
<
less than
>
greater than
<=
less than or equal to
>=
greater than or equal to
#
string concatenation
"@var@"
variable expansion - used inside of quoted strings to expand a variable in the string.

Conditional operators are treated thus for variables:

Operator Meaning
    ==          
strings must be equal (case sensitive)
    !=         
strings must not be equal (case sensitive)
    <,>,<=,>=  
strings converted to numbers and then compared. Empty strings or strings that are non-numeric result in a zero value.


Home Contents Previous Next