BAgFA‖Eqv Operator

Contents
hYNye‖

# EQ8cg‖Eqv Operator

oTT4F‖Calculates the logical equivalence of two expressions.

## sRZNW‖Syntax:

    m9bM6‖Result = Expression1 Eqv Expression2

## 7fkPv‖Parameters:

YF6ox‖ Result: Any numeric variable that contains the result of the comparison.

AQWZa‖ Expression1, Expression2: Any expressions that you want to compare.

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

XrGXb‖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.

## FpFjm‖Example:

    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
    BYUKj‖    vOut = A > B Eqv B > C ' returns -1
    oWNBr‖    vOut = B > A Eqv B > C ' returns 0
    DRe4J‖    vOut = A > B Eqv B > D ' returns 0
    cGGz7‖    vOut = (B > D Eqv B > A) ' returns -1
    oHBvb‖    vOut = B Eqv A ' returns -3
    End Sub

Please support us!