IMcOMGlobalMcOpOR Method
|
|
Logical binary operator to combine two variants using a logical "or".
Namespace:
MediaCy.IQL.ObjectManager
Assembly:
MediaCy.IQL.ObjectManager (in MediaCy.IQL.ObjectManager.dll) Version: 10.0.6912.0
SyntaxFunction McOpOR (
LeftOperand As Object,
RightOperand As Object
) As McObject
Parameters
- LeftOperand
- Type: SystemObject
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
- Type: SystemObject
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.
Return Value
Type:
McObjectA 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.
RemarksA "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.
ExamplesDim mcoLeft As McObject
Set mcoLeft = McObjectTemp(Array(1, 2, 3, 4, 5, 6))
varRight = Array(0, 2, 8)
Set varSel1 = McOpLT(mcoLeft, varRight)
Set varSel2 = McOpGT(mcoLeft, varRight)
Set varSel = McOpAnd( varSel1, varSel2)
Show Operation Selector Result = 0 -2 2 3 4 5
Debug.Print "Operation Selector Result = " + McToText(varSel)
Debug.Print "Result selected values = " + McToText(mcoLeft.SelectedValues(varSel))
See AlsoReference
McOpAnd
McOpOr
McOpNot