Operators in VBScript


In VBScript the following applies in terms of the precedence of operators. Arithmetic operators are evaluated first. Comparison operators are evaluated second. Logical operators are evaluated last. All comparison operators have equal precedence and are evaluated left-to-right as encountered. Arithmetic operators are evaluated in the order of the table displayed below.

Arithmetic Operators

OperatorPurpose
^exponentation : raises a number to a power
-unary negation
*multiplication
/division
\integer division : returns the integer part of a division (truncation)
MODmodulo : returns the remainder of a division
+addition
-subtraction
&string concatenation

The Is operator is an object reference comparison operator. The Is operator compares object references and if those references refer to a single object. The Is operator does not compare values of objects.

Comparison Operators

OperatorPurpose
=equal
<>not equal
<less than
>greater than
<=less than or equal to
>=greater than or equal to
Isequivalent object

Logical Operators

OperatorPurpose
NotLogical negation
AndLogical conjunction
OrLogical disjunction
XorLogical exclusion
EqvLogical equivalence
ImpLogical implication