The following table lists the operators in order of precedence. When evaluating an expression, the program evaluates an operator before it evaluates those lower than it in the list. When operators are on the same line, the program evaluates them from left to right.
Operator | Description |
---|---|
^ | Exponentiation |
- | Negation |
*, / | Multiplication and division |
\ | Integer division |
Mod | Modulus |
+, -, + | Addition, subtraction, and concatenation |
& | Concatenation |
<<, >> | Bit shift |
=, <>, <, <=, >, >=, Like, Is, IsNot, TypeOf...Is | All comparisons |
Not | Logical and bitwise negation |
And, AndAlso | Logical and bitwise And with and without short-circuit evaluation |
Xor, Or, OrElse | Logical and bitwise Xor, and Or with and without short-circuit evaluation |
Use parentheses to change the order of evaluation and to make expressions easier to read.