Operator Precedence and Associativity

The following operators can be used in Setup Factory expressions:

Notes:

A unary operator takes a single value.

A binary operator takes two values.

A right-associative operator operates on the value to its right.

An infix operator operates on one value to its left and one value to its right.

(All infix operators in Setup Factory are left-associative.)

In order of precedence, from highest to lowest:

Name:

Notes:

Precedence Level:

(

open parenthesis

8 (highest)

)

closed parenthesis

8

+

unary plus

unary, right-associative

7

-

unary minus

unary, right-associative

7

!

logical not

unary, right-associative

7

*

multiply

binary, infix

6

/

divide

binary, infix

6

MOD

modulus

binary, infix

6

+

add

binary, infix

5

-

subtract

binary, infix

5

<

less than

binary, infix

4

<=

less than or equal

binary, infix

4

>

greater than

binary, infix

4

>=

greater than or equal

binary, infix

4

=

equal

binary, infix

3

!= or <>

not equal

binary, infix

3

AND

Boolean AND

binary, infix

2

OR

Boolean OR

binary, infix

1 (lowest)

 

 SEE ALSO 

 

?

For details on the usage and syntax of expressions, please see Chapter 15: Expressions in the User's Guide.

 

See Also: Expressions, Operators