Operators

Arithmetic Operators

symbol meaning
+ Addition
- Subtraction
* Multiplication
/ Division
\ Integer division
MOD Remainder after division
Division with /

If you use the / symbol to divide two numbers the answer will always be a Double.
This is because the answer may not always be a whole number.

Integer Division using \

If you use the \ symbol to divide two numbers the answer will always be an Integer.
Any fractional part will be discarded.
In effect the answer is rounded down.

Comparison Operators

symbol meaning
= Equal
<> Not equal
< Less than
> Greater than
<= Less than or equal to
>= Greater than or equal to

Logical Operators

Logical operators work on Boolean expressions.

symbol meaning
Not Logical negation
And Logical conjunction
Or Logical disjunction
Xor Logical exclusion

Bitwise Operators

Bitwise operators work on two integer values in Binary format. Each bit in the first number is compared with the corresponding bit in the second number.

symbol meaning
And The bit in the result is only 1 if both of the compared bits are 1
Or The bit in the result is a 1 if either, or both, of the compared bits are 1
Xor The bit in the result is a 1 if either of the compared bit are 1, but not if they are both 1