| Operator |
Description |
Example |
Result |
| + |
Adds numbers together. It also concatenates
strings together. |
5+3 |
8 |
| - |
Used to subtract numbers. It can be used to
indicate sign of a number. eg: -5 |
5-3 |
2 |
| * |
Used to multiple numbers together |
5*2 |
10 |
| / |
Used to divide numbers. It returns decimal number. |
5/2 |
2.5 |
| \ |
Used to divide numbers. It returns integer number. |
5\2 |
2 |
| ^ |
Raises a number to a power. |
5^2 |
25 |
| & |
Used to concatenate strings together |
"I"&"AM" |
I AM |
| = |
Used to assign a value to a variable or compare values. |
Num=33 |
Num=33 |
| < |
Tests if first expression is less than second
expression. |
Num<55 |
true |
| > |
Tests if first expression is greater than second
expression |
Num>55 |
false |
| <= |
Tests if first expression is less than or equal to
second expression |
Num<=33 |
true |
| >= |
Tests if first expression is greater than or equal to
second expression. |
Num>=22 |
false |
| <> |
Tests if first expression is not equal to second
expression |
Num<>31 |
true |
| And |
Performs a logical conjunction on two expressions or
bit-by-bit comparison of two integers. |
See if statement |
|
| Or |
Performs a logical conjunction on two expressions or
bit-by-bit comparison of two integers. |
See if statement |
|
| Not |
Perform a logical negation on an expression. |
not = 22 |
true |
| Mod |
Returns the reminder of two divided numbers. |
5 mod 2 |
1 |