Eqv Operator (Logical Equivalence)
Language Items List
Definition:
Used to perform a bit-wise equivalence comparison of two expressions.
Syntax:
result = expr1 Eqvexpr2
Details:
The Eqv Operator returns a numeric value based on the bit values of the
numeric expressions supplied to the logical operator. The logical operators perform a
bit-wise comparison on these values. If both bits are off, or both are on, the
corresponding result bit is on. If one bit is on and the other is off, the result bit is off.
The Eqv operator performs a bit by bit comparison of identically positioned
bits in two numeric expressions and sets the corresponding bit in the result value as follows:
expr1 expr2 result
0 0 1
0 1 0
- 1 1
- 0 0
The Eqv operator is executed after all arithmetic and relational operations in
the same expression.
See Also:
Arithmetic Operators
Comparison Operators
Operator Precedence