Operator Eqv (Equivalence)

Returns the bitwise-and (equivalence) of two numeric values

Syntax
	KeyPgDeclareDeclare KeyPgOperatorOperator Eqv ( KeyPgByrefByRef lhs KeyPgAsAs T1, KeyPgByrefByRef rhs KeyPgAsAs T2 ) KeyPgAsAs Ret

Usage
	result = lhs Eqv rhs

Parameters
	lhs
		The left-hand side expression.
	T1
		Any numeric or boolean type.
	rhs
		The right-hand side expression.
	T2
		Any numeric or boolean type.
	Ret
		A numeric or boolean type (varies with T1 and T2).

Return Value
	Returns the bitwise-equivalence of the two operands.

Description
	This operator returns the bitwise-equivalence of its operands, a logical 
	operation that results in a value with bits set depending on the bits of 
	the operands (for conversion of a boolean to an integer, false or true 
	boolean value becomes 0 or -1 integer value).

	The truth table below demonstrates all combinations of a 
	boolean-equivalence operation:

		Ŀ
		Lhs BitRhs BitResult
		0      0      1     
		1      0      0     
		0      1      0     
		1      1      1     
		

	No short-circuiting is performed - both expressions are always 
	evaluated.

	The return type depends on the types of values passed. KeyPgByteByte, KeyPgUbyteUByte and 
	floating-point type values are first converted to KeyPgIntegerInteger. If the left 
	and right-hand side types differ only in signedness, then the return 
	type is the same as the left-hand side type (T1), otherwise, the larger 
	of the two types is returned. Only if the left and right-hand side types 
	are both KeyPgBooleanBoolean, the return type is also KeyPgBooleanBoolean.

	This operator can be overloaded for user-defined types.

Example
	Dim As UByte a = &b00110011
	Dim As UByte b = &b01010101, c
	c = a Eqv b '' c = &b10011001

Dialect Differences
	* In the CompilerOptlang-lang qb dialect, this operator cannot be overloaded.

Differences from QB
	* None

See also
	* TblTruthOperator Truth Tables

