The precedence of thinkScript® operators is shown in the following table:
Precedence | Operator |
---|---|
1 |
[]; from
|
2 |
!
|
3 |
*; /; %
|
4 |
+ (string concatenation)
|
5 |
+ (addition); -
|
6 |
<; is less than; >; is greater than; <=; is less than or equal to; >=; is greater than or equal to; crosses above; crosses below; crosses
|
7 |
==; equals; is equal to; !=; <>; is not equal to
|
8 |
is true; is false
|
9 |
and; &&
|
10 |
or
|
11 |
if
|
12 |
within
|
Operator between
has precedence lower than addition or subtraction but higher than the conditional operator.
Operator +
can be used for both addition and string concatenation, in which case concatenation has higher precedence than addition (4 vs. 5).