Operators

This is a list of the operators their symbols and priorities.

SymbolPriorityName
() 7 Parenthisis
[] 7 Square Bracket
! 6 Logical Not
~ 6 Bit Inversion
- 6 Unary Negate
-- 6 Decrement
++ 6 Increment
* 5 Multiply
/ 5 Divide
% 5 Modulo
+ 4 Add
- 4 Subtract
<< 3 Shift Left
>> 3 Shift Right
< 2 Less Than
<= 2 Less Than or Equal
> 2 Greater Than
>= 2 Greater Than or Equal
!= 2 Not Equal
<> 2 Not Equal
== 2 Equal
& 1 And
| 1 Or
^ 1 Xor
! 1 Not
= 0 Assignment

You will note that some of the symbols differ from traditional Basic and are the same as the C language uses.

The major differences are:
Equivalance is == instead of =.
All the Logical operators use symbols insted of infix words.
The symbol ^ is Xor and not Power.
The shift oprerators >> and << are supported.
The unary prefix operators -- and ++ are supported.
All Arithmetic and Logical operators can be combined with Assignment like +=, *= etc. and are all priority 0 like Assignment

All operators except the Assignment operators are left to right associtive, this means that operators of equivalent priority will be executed in a left to right order.

Assignment is right to left associtive. This means A=B=C=0 will do what modern programmers expect. First C will be assigned 0, then B will be assigned C, then A will be assigned B.