Eqv Operator

Calcula a equivalencia l贸xica de d煤as expresi贸ns.

Sintaxe:


Resultado = Expresi贸n1 Eqv Expresi贸n2

Par谩metros:

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

Expresi贸n1, Expresi贸n2: Calquera parella de expresi贸ns que queira comparar.

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

Nas comparaci贸ns entre bits, o operador Eqv s贸 activa o bit correspondente do resultado se est谩 activado ou desactivado en ambas as expresi贸ns.

Exemplo:


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 = A > B Eqv B > C REM devolve -1
    vOut = B > A Eqv B > C REM devolve 0
    vOut = A > B Eqv B > D REM devolve 0
    vOut = (B > D Eqv B > A) REM devolve -1
    vOut = B Eqv A REM devolve -3
End Sub

Precisamos da s煤a axuda!