Description

Arithmetic binary operator to Xor the bits of two variants.

Return Type

A McObject object.  

A McObject instance holding varLeftOperand ^ varRightOperand. The returned result will be of the arithmetic type of varLeftOperand. It will also be the same shape as varLeftOperand, except that it will always be an array, even if the varLeftOperand is a scalar (generally there is no reason to use these vector operators unless you are dealing with arrays).

Syntax

object.McOpXorBits (LeftOperand, RightOperand)

The McOpXorBits Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McOMGlobal.
LeftOperandRequired. A Variant value.

Left operand. May be a scalar or array of any integral type. It may also be an McObject instance of an integral type.

RightOperandRequired. A Variant value.

Right operand. May be a scalar or array of any numeric type. It may also be an McObject instance of a numeric type.

Remarks

The VARIANT varRightOperand is Xored to the VARIANT varLeftOperand and the result is returned. The left operand must be an integral type; the right operator is cast to an integral number by truncation if necessary.

If the shape of varRightOperand differs from varLeftOperand, then elements from the varRightOperand are associated with elements from from varLeftOperand in order, irrespective of number of dimensions or sizes of dimensions. If the vector length of varRightOperand is less than that of varLeftOperand, the right operand is re-used as often as necessary.

As illustrated in the example, the result can be accessed as an McObject instance by assigning with the “Set” keyword, or it can be accessed as a numeric Variant (the default McObject.Value property) by assigning to a Variant variable without the “Set” keyword. McToText and all of the vector operations will take either type of Variant as arguments. When performing sequential vector operations on large arrays, an extra copy is avoided by passing results from one operation to the next an McObject instance instead of as a Variant numeric array.

Exceptions

Operands must scalars or arrays of some numeric type. Operands may be arrays of VARIANT, but if they are, all elements must be of the same arithmetic type. E.g., Array( 1, 2) is OK, but Array( 1.5, 2) is not legal. The left operand must be an integral type (i.e., it cannot be a float or single type).