Expression Operators and their Precedence

The following are the valid operators for expressions listed in order of precedence from highest to lowest.

Expression

Description

1.

Unary -, +, ~, *NOT

- Makes a negative number + Provides an explicit sign Not Condition

2.

**

Exponent

3.

* , /

Multiply, Divide

4.

+ , -

Add, Subtract

5.

<, *LT

>, *GT

<=, *LE

>=, *GE

=, *EQ

<>, *NE

Less Than

Great Than

Less Than or Equal To

Greater Than or Equal To

Equal Condition

Not Equal Condition

6.

&, *AND

And Condition

7.

|, *OR

Or Condition

Any number of parentheses ( ) can be used to force the precedence of any operator. The deepest levels of parentheses will be evaluated first, until the whole expression is evaluated.

All of the mathematical operands, such as -, +, /, *, and ** are valid only for numeric values, except for the '+'. The '+' will also do a concatenate if the two operands are character strings.