Eqv Operator and Equivalence

The program uses the Eqv operator to test the equivalence of two statements.

``````'Eqv operator
'Demonstrates the Eqv operator and equivalence.
'**********************************************

#define False 0
#define True NOT False

Dim As Integer myInt1 = 4, myInt2 = 2

Print "myInt1 = ";myInt1;" myInt2 = ";myInt2
Print

'Both statements are true so are equivalent.
Print "Statement myInt1 < 5 eqv myInt2 > 1 ";
If (myInt1 < 5) Eqv (myInt2 > 1) = True Then
Print "is equivalent."
Else
Print "is not equivalent."
End If
Print

'Both statements are false so are equivalent.
Print "Statement myInt1 > 5 eqv myInt2 < 1 ";
If (myInt1 > 5) Eqv (myInt2 < 1) = True Then
Print "is equivalent."
Else
Print "is not equivalent."
End If
Print

'One is true, the other false so statement
'is not equivalent.
Print "Statement myInt1 > 5 eqv myInt2 < 1 ";
If (myInt1 > 3) Eqv (myInt2 < 1) = True Then
Print "is equivalent."
Else
Print "is not equivalent."
End If

Sleep
End```
```