Eqv Operator

Calculates the logical equivalence of two expressions.

Sintaksa:


Resultat = Izrar_1 MOD Izraz_2

Parametri:

Resultat:: Brojcana varijabla koja sadrzi rezultat MOD operacije.

Izraz_1, Izraz_2: Brojcani izraz koji zelite da podijelite.

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.

Primjer:


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

Please support us!