Module
Contents
Index 🔎︎

# Eqv Operator

Calculates the logical equivalence of two expressions.

## Sintakse:

    Rezultats = Izteiksme1 Eqv Izteiksme2

## Parametri:

Rezultats: jebkurš skaitliskais mainīgais, kurš satur salīdzināšanas rezultātu.

Izteiksme1, Izteiksme2: jebkuras izteiksmes, kuras jūs vēlaties salīdzināt.

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.

## Piemērs:

    Sub ExampleEqv

    Dim A As Variant, B As Variant, C As Variant, D As Variant

    Dim vOut As Variant

        A = 10: B = 8: C = 6: D = Null

        mIzv = A > B Eqv B > C ' atgriež -1

        mIzv = B > A Eqv B > C ' atgriež 0

        mIzv = A > B Eqv B > D ' atgriež 0

        mIzv = (B > D Eqv B > A) ' atgriež -1

        mIzv = B Eqv A ' atgriež -3

    End Sub