LOTUSSCRIPT LANGUAGE


Eqv operator
Performs a logical equivalence on two expressions.

Syntax

expr1 Eqv expr2

Elements

expr1, expr2


Usage

The following table explains how LotusScript determines the result of the Eqv operation.

expr1expr2Result
TRUE TRUE TRUE
TRUE FALSE FALSE
FALSE TRUE FALSE
FALSE FALSE TRUE
TRUENULLNULL
NULLTRUENULL
FALSENULLNULL
NULL FALSENULL
NULL NULL NULL
In addition to performing a logical equivalence, the Eqv operator compares identically positioned bits in two numeric expressions (known as a bit-wise comparison) and sets the corresponding bit in the result according to the following table.
Bit n in expr1Bit n in expr2Bit n in result
1 1 1
1 0 0
0 1 0
0 0 1

Example

Dim a As Variant, b As Variant, c As Variant
a = &HF
b = &HF0
c = &H33
Print TRUE Eqv TRUE               ' Prints True
Print FALSE Eqv FALSE             ' Prints True
Print TRUE Eqv FALSE              ' Prints False
Print Hex$(a Eqv b)               ' Prints FFFFFF00
Print Hex$(a Eqv c)               ' Prints FFFFFFC3
Print Hex$(b Eqv c)               ' Prints FFFFFF3C

See Also