|1||unary -, unary +|
|7||=, <, >, <=, >=, <>|
Operators at level one have the highest precedence, with operators at level seven having the lowest precedence. Parentheses can be used to override the order of precedence rules, allowing parts of an expression to be evaluated before others.
The operators used for comparison are called relational operators. Applying a relational operator will yield a result of true or false.
|=||Is equal to|
|<||Is less than|
|>||Is greater than|
|<=||Is less than or equal to|
|>=||Is greater than or equal to|
|<>||Is not equal to|
The only relational operators supported for string types are equal and not equal, unless the string is being compared against nothing., in which case "is" and "isnot" may be used. Because the internal binary representation of floating point numbers may not be exact, the equality operator should be avoided for floating point numbers.
In addition to the mathematical operators shown above, you can use the unary operator to change the sign. For example,
Sub Main() Dim Value As SByte Value = 10 ' Value = 10 Value = -Value ' Value = -10 End Sub
Logical operators can be used to build conditional expressions, for example, when using if…then, while…end while and do…repeat until statements. Applying a boolean operator yields either true or false.
The following operators perform bitwise manipulation on integer operands.
|NOT||A bitwise NOT or complement|