Operators are symbols which represent an operation on an expression.
Operators
Notes
Operators are evaluated by precedence.
Operator |
Description |
Precedence |
Expression |
|
|
( )
|
parentheses expression delimiter |
8 |
Unary |
|
|
!
|
not operator |
7 |
+
|
plus operator |
7 |
-
|
minus operator |
7 |
~
|
one's complement operator |
7 |
#
|
stringizing operator |
7 |
#@
|
charizing operator |
7 |
Binary - Arithmetic |
|
|
*
|
multiplication operator |
6 |
/
|
division operator |
6 |
%
|
modulus operator |
6 |
+
|
addition operator |
6 |
-
|
subtraction operator |
6 |
##
|
concatenation operator |
6 |
Binary - Bitwise |
|
|
<<
|
bit left shift operator |
5 |
>>
|
bit right right operator |
5 |
&
|
bit and operator |
5 |
|
|
bit or operator |
5 |
^
|
bit xor operator |
5 |
Binary - Relational |
|
|
<
|
less than operator |
4 |
>
|
greater than operator |
4 |
<=
|
less than or equal to operator |
4 |
>=
|
greater than or equal to operator |
4 |
==
|
equal to operator |
4 |
!=
|
not equal to operator |
4 |
Binary - Logical |
|
|
&&
|
and operator |
3 |
||
|
or operator |
3 |
^^
|
xor operator |
3 |
Sequence |
|
|
,
|
sequence operator |
1 |
Example
result = 10
x + 5
!doMore
isObject || isConstant
index < length
( offset + 10 ) / 2
max( value1, value2 )
|