AND OPERATOR
result
Any numeric variable.
expression1
Any expression.
expression2
Any expression.
If expression1 is And expression2 is The result is
True True True
True False False
True Null Null
False True False
False False False
False Null False
Null True Null
Null False False
Null Null Null
The And operator also performs a bitwise comparison of identically positioned bits in two numeric
expressions and sets the corresponding bit in result according to the following table:
And bit in expression2
If bit in expression1 is The result is
is
0 0 0
0 1 0
1 0 0
1 1 1
NOT OPERATOR
result
Any numeric variable.
expression
Any expression.
Remarks
The following table illustrates how result is determined:
If expression is Then result is
True False
False True
Null Null
In addition, the Not operator inverts the bit values of any variable and sets the corresponding bit in
result according to the following table:
Bit in expression Bit in result
0 1
1 0
OR OPERATOR
result
Any numeric variable.
expression1
Any expression.
expression2
Any expression.
Remarks
If either or both expressions evaluate to True, result is True. The logical operation is not short-
circuited. All expressions are evaluated.
The following table illustrates how result is determined:
If expression1 is And expression2 is Then result is
True True True
True False True
True Null True
False True True
False False False
False Null Null
Null True True
Null False Null
Null Null Null
The Or operator also performs a bitwise comparison of identically positioned bits in two numeric
expressions and sets the corresponding bit in result according to the following table:
And bit in expression2
If bit in expression1 is Then result is
is
0 0 0
0 1 1
1 0 1
1 1 1
XOR OPERATOR
result
Any numeric variable.
expression1
Any expression.
expression2
Any expression.
Remarks
If one, and only one, of the expressions evaluates to True, result is True. However, if either expression
is Null, result is also Null. When neither expression is Null, result is determined according to the
following table:
If expression1 is And expression2 is Then result is
True True False
True False True
False True True
False False False
The Xor operator also performs a bitwise comparison of identically positioned bits in two numeric
expressions and sets the corresponding bit in result according to the following table:
And bit in expression2
If bit in expression1 is Then result is
is
0 0 0
0 1 1
1 0 1
1 1 0
IS OPERATOR
result = object1 Is object2
Arguments
result
Any numeric variable.
object1
Any object name.
object2
Any object name.
Remarks
If object1 and object2 both refer to the same object, result is True; if they do not, result is False. Two
variables can be made to refer to the same object in several ways.
In the following example, A has been set to refer to the same object as B:
Copy
Set A = B
The following example makes A and B refer to the same object as C:
Copy
Set A = C
Set B = C
EQV OPERATOR
Used to perform a logical equivalence on two expressions.
Syntax: VBScript Eqv Operator
result = expression1 Eqv expression2
Arguments: VBScript Eqv Operator
result
any numeric variable.
expression1
Any expression.
expression2
Any expression.
Remarks: VBScript Eqv Operator
If either expression is Null, result is also Null. When neither expression is Null, result is determined
according to the following table:
If expression1 is And expression2 is The result is
True True True
True False False
False True False
False False True
The Eqv operator performs a bitwise comparison of identically positioned bits in two numeric
expressions and sets the corresponding bit in result according to the following table:
If bit in expression1 is And bit in expression2 is The result is
0 0 1
0 1 0
1 0 0
1 1 1
IMP OPERATOR
Used to perform a logical implication on two expressions.
Syntax: VBScript Imp Operator
result = expression1 Imp expression2
Arguments: VBScript Imp Operator
result
Any numeric variable.
expression1
Any expression.
expression2
Any expression.
Remarks: VBScript Imp Operator
The following table illustrates how result is determined:
If expression1 is And expression2 is Then result is
True True True
True False False
True Null Null
False True True
False False True
False Null True
Null True True
Null False Null
Null Null Null
The Imp operator performs a bitwise comparison of identically positioned bits in two numeric
expressions and sets the corresponding bit in result according to the following table:
If bit in expression1 is And bit in expression2 is Then result is
0 0 1
0 1 1
1 0 0
1 1 1
The value of 1 is true and 0 is false in vbscript.