Given multiple operations within an expression, Visual Basic evaluates the parts from left to right using the following precedence: parentheses, arithmetic operators, comparison operators, and logical operators.

Arithmetic Comparison Logical

^ Exponentiation

- Unary negation

* Multiplication

/ Division

\ Integer division

Mod Modulus (returns the remainder)

+ Addition


& String concatenation

= Equality

<> Inequality

< Less than

> Greater than

<= Less than or equal to

>= Greater than or equal to

Is Object equivalence

Not Logical negation

And Logical conjunction

Or Logical disjunction

Xor Logical exclusion

Eqv Logical equivalence

Imp Logical implication

Multiplication and Division actually have equal precedence. Addition and Subtraction also have equal precedence. Operators within the comparison operators category all have equal precedence.

Page Modified: (Hand noted: ) (Auto noted: )