EQV - QB64 Wiki

EQV

From QB64 Wiki

Jump to: navigation, search

The EQV statement returns a value based on the equivalence of two conditions or values.


Syntax:

first_value EQV second_value


{{PageDescription}

  • Returns True only when both values are the same.
  • Turns a bit on if both bits are the same, turns a bit off if both bits are different.


The results of the bitwise logical operations, where A and B are operands, and T and F indicate that a bit is set or not set:
Operands Operations
A B NOT B A AND B A OR BA XOR BA EQV BA IMP B
T T F T T F T T
T F T F T T F F
F T F F T T F T
F F T F F F T T
Note that the Relational Operations return negative one (-1, all bits set) and zero (0, no bits set) for true and false, respectively.
This allows relational tests to be inverted and combined using the bitwise logical operations.



See also:



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page