Description
Logical binary operator to combine two variants using a logical or.
-
Return Type
-
A McObject object.
A McObject instance holding a selector identifying indices where varLeftOperand is selected Or varRightOperand is selected. The returned result will be of type mcobjTypeINTEGER. And it will be the same shape as varLeftOperand.
-
Syntax
-
object.McOpOR (LeftOperand, RightOperand)
The McOpOR Method syntax has these parts: |
| object | An expression evaluating to an object of type McOMGlobal. | | LeftOperand | Required. A Variant value. Left operand. May be a scalar or array of any numeric type. It may also be an McObject instance of a numeric type. This operand is cast to type mcobjTypeINTEGER if necessary before the logical operation is done.
| | RightOperand | Required. 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. This operand is cast to type mcobjTypeINTEGER if necessary before the logical operation is done.
| Remarks
A selector is returned showing which elements of VARIANT varLeftOperand are selected Or the corresponding elements of VARIANT varRightOperand are also selected. A selector is an integral array that has positive index values representing selected, or true, elements and negative, -(index+1), values representing unselected, or false, elements. Selectors can be passed in as arguments to the the McObject.SelectedValues property to extract a sub-array containing only selected elements from an array or matrix.
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.
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.
|