AND OPERATOR

result Any numeric variable. expression1 Any expression. expression2 Any expression.

If expression1 is And expression2 is The result is True True True False False False Null Null Null True False Null True False Null True False Null True False Null False False False Null False 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:

If bit in expression1 is 0 0 1 1 And bit in expression2 The result is is 0 1 0 1 0 0 0 1 NOT OPERATOR result Any numeric variable. expression Any expression. 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 . Remarks The following table illustrates how result is determined: If expression is Then result is True False Null False True Null In addition.

expression1 Any expression. result is True. The logical operation is not shortcircuited. expression2 Any expression. All expressions are evaluated. The following table illustrates how result is determined: If expression1 is And expression2 is Then result is True True True False False False Null True False Null True False Null True True True True True False Null True . Remarks If either or both expressions evaluate to True.OR OPERATOR result Any numeric variable.

result is also Null. When neither expression is Null. and only one. result is True. result is determined according to the following table: . expression1 Any expression. However.Null Null False 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: If bit in expression1 is 0 0 1 1 And bit in expression2 Then result is is 0 1 0 1 0 1 1 1 XOR OPERATOR result Any numeric variable. of the expressions evaluates to True. expression2 Any expression. Remarks If one. if either expression is Null.

object1 Any object name. object2 Any object name.If expression1 is And expression2 is Then result is True True False False True False True False False True True 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: If bit in expression1 is 0 0 1 1 And bit in expression2 Then result is is 0 1 0 1 0 1 1 0 IS OPERATOR result = object1 Is object2 Arguments result Any numeric variable. .

Remarks: VBScript Eqv Operator If either expression is Null. In the following example. result is True.Remarks If object1 and object2 both refer to the same object. When neither expression is Null. if they do not. Two variables can be made to refer to the same object in several ways. Syntax: VBScript Eqv Operator result = expression1 Eqv expression2 Arguments: VBScript Eqv Operator result any numeric variable. result is False. expression2 Any expression. result is also Null. expression1 Any expression. 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. result is determined according to the following table: .

expression1 Any expression. .If expression1 is True True False False And expression2 is True False True False The result is True 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 0 0 1 1 And bit in expression2 is 0 1 0 1 The result is 1 0 0 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.

expression2 Any expression. Remarks: VBScript Imp Operator The following table illustrates how result is determined: If expression1 is True True True False False False Null Null Null And expression2 is True False Null True False Null True False Null Then result is True False Null True True True True 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 0 0 1 1 And bit in expression2 is 0 1 0 1 Then result is 1 1 0 1 .

.The value of 1 is true and 0 is false in vbscript.

Sign up to vote on this title
UsefulNot useful