Purpose |
The EQV operator works as both a logical and a bitwise arithmetic operator. | ||||||||||||||||||

Syntax |
| ||||||||||||||||||

Remarks |
EQV returns TRUE (non-zero) if IF x EQV y = 0 THEN …is equivalent to: IF x = NOT y THEN The EQV operator can be used for comparing
signed and unsigned values of the same bit size, such as Long-integer
and Double-word. This use of
EQV is similar to using the BITS functions;
however, care must be exercised to test the return value of EQV correctly,
since EQV will return an unsigned value with all bits set The EQV truth table looks like this:
Using EQV as a bitwise arithmetic operator The EQV operator is seldom used as a bitwise arithmetic operator, but here is an example: | ||||||||||||||||||

See also |
Arithmetic Operators, AND, IMP, ISFALSE, ISTRUE, LET, NOT, OR, XOR | ||||||||||||||||||

Example |
IF (Var1& EQV Var2???) = BITS???(-1&) THEN ... IF (Val1% EQV Var2??) = &H0FFFF?? THEN ... IF -1& EQV BITS???(-1&) = &H0FFFFFFFF THEN ... IF -1% EQV BITS??(-1%) = &H0FFFF THEN ... |