# Eqv Operator

Calculates the logical equivalence of two expressions.

## āļāˇāļģāļ āļģāˇāļ­āˇāļē:

``````
āļ´āˇâāļģāļ­āˇāļĩāļŊāļē = āļ´āˇâāļģāļāˇāˇāļąāļē1 + āļ´āˇâāļģāļāˇāˇāļąāļē2
``````

## āļ´āļģāˇāļ¸āˇāļ­āˇāļąāˇ:

Result:āˇāļāļāļŊāļąāļēāˇ āļ´āˇâāļģāļ­āˇāļĩāļŊāļē āļāļŠāļāļāˇ āˇāļą āļāļąāˇāļ¸ āˇāļāļāˇâāļēāˇāļ­āˇāļ¸āļ āˇāˇāļ āļŊāˇâāļēāļēāļāˇ.

Expression1, Expression2: āļāļļāļ§ āˇāļ¸āˇāļļāļąāˇāļ° āļāļģāˇāļ¸āļ§ āļāˇāˇāˇâāļē āļāļąāˇāļ¸ āˇāļāļāˇâāļēāˇāļ­āˇāļ¸āļ āļ´āˇâāļģāļāˇāˇāļąāļēāļąāˇ.

When testing for equivalence between Boolean expressions, the result is True if both expressions are either True or False.

In a bit-wise comparison, the Eqv operator only sets the corresponding bit in the result if a bit is set in both expressions, or in neither expression.

## āļāļ¯āˇāˇāļģāļĢāļē:

``````
Sub ExampleEqv
Dim A As Variant, B As Variant, C As Variant, D As Variantsee #i38265
Dim vOut As Variant
A = 10: B = 8: C = 6: D = Null
vOut = vA > vB Xor vB > vD REM returns -1
vOut = vB > vA Xor vB > vC REM returns -1
vOut = vA > vB Xor vB > vC REM returns 0
vOut = (vB > vD Xor vB > vA) REM returns 0
vOut = vB Xor vA REM returns 2
End Sub
``````