Syntax 
Expression1 Eqv expression2 

Description 
Performs a logical or binary equivalence on two expressions. 

Comments 
If both expressions are either Boolean, Boolean variants, or Null variants, then a logical equivalence is performed as follows: 


If the first 
and the second 
then the 


TRUE 
TRUE 
TRUE 


TRUE 
FALSE 
FALSE 


FALSE 
TRUE 
FALSE 


FALSE 
FALSE 
TRUE 


If either expression is Null, then Null is returned. 


Binary Equivalence If the two expressions are Integer, then a binary equivalence is performed, returning an Integer result. All other numeric types (including Empty variants) are converted to Long and a binary equivalence is then performed, returning a Long result. Binary equivalence forms a new value based on a bitbybit comparison of the binary representations of the two expressions, according to the following table: 


1 
Eqv 
1 
= 
1 
Example 

0 
Eqv 
1 
= 
0 
5 01101001 

1 
Eqv 
0 
= 
0 
6 10101010 

0 
Eqv 
0 
= 
1 
Eqv 00101000 
Example 
This example assigns False to A, performs some
equivalent operations, and displays a dialog box with the result.
Since A is equivalent to False, and False is equivalent to 0, and
by definition, Sub Main() 

See Also 
Operator Precedence (topic); Or (operator); Xor (operator); Imp (operator); And (operator). 
E 