Quick reference to operators

The following table lists the logical operators.
Symbol
Operator
Example
AND, &&
and
(tag_1 < tag_ 2) AND (tag_1 = 5)
OR, ||
or
(tag_1 = 5) OR (tag_1 = 10)
NOT
negation
NOT(tag_1 > tag_2)
The following table lists the relational operators.
Symbol
Operator
Example
EQ, ==
equal
tag_1 == tag_2
NE, <>
not equal
tag_1 <> tag_2
LT, <
less than
tag_1 < tag_2
GT, >
greater than
tag_1 > tag_2
LE, <=
less than or equal to
tag_1 <= tag_2
GE, >=
greater than or equal to
tag_1 >= tag_2
The following table lists the arithmetic operators.
Symbol
Operator
Example
+
addition
tag_1 + tag_2
-
subtraction
tag_1 - tag_2
*
multiplication
tag_1 * tag_2
/
division
tag_1 / tag_2
MOD, %
modulus (remainder)
tag_1 % tag_2
The modulus operator is the remainder of one number divided by another. For example, the remainder of 13 divided by 5 is 3; so 13 % 5 = 3
This operator is for integers only, not floating point numbers.
**
exponent
tag_1 ** 2
The following table lists the bitwise operators.
Symbol
Operator
Example
&
AND
tag_1 & 07
|
inclusive OR
tag_2 | tag_1
^
exclusive OR (XOR)
tag_1 ^ 01
>>
right shift
tag_1 >> 1
<<
left shift
tag_1 << 2
~
complement
~ tag_1
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal