IMcOMGlobalMcOpNOT Method
|
|
Logical unary operator to negate the sense of a selector array
Namespace:
MediaCy.IQL.ObjectManager
Assembly:
MediaCy.IQL.ObjectManager (in MediaCy.IQL.ObjectManager.dll) Version: 10.0.6912.0
SyntaxFunction McOpNOT (
Operand As Object
) As McObject
Parameters
- Operand
- Type: SystemObject
May be a scalar or array of any numeric type. It may also be a
McObject instance of a numeric type. If the type does not resolve to
mcobjTypeINTEGER (i.e. it must be an McObject of this type or a "long"
VARIANT array), then each value is first converted into its corresponding
index value; in this process all non-negative values are converted to index
while all negative values are converted to -(index+1).
Return Value
Type:
McObjectA McObject instance holding a selector inverting the sense of the
varOperand selector. The returned result will be of type mcobjTypeINTEGER. And
it will be the same shape as varOperand.
RemarksThis is a logical operator that changes the "true/false" sense
of a selector. Use the McOpBitwiseNot (complement bits) or McOpNeg (negate
values) for arthmetic unary operations.
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.
RemarksThis unary operator, changes the true/false sense of a "selector"
by changing its negative by applying the operation of value=(-value+1) to
each of its elements.
ExamplesDim mcoLeft As McObject
Set mcoLeft = McObjectTemp(Array(1, 2, 3, 4, 5, 6))
varRight = Array(0, 2, 8)
Set varSel = McOpLT(mcoLeft, varRight)
Debug.Print "Operation Selector Result = " + McToText(varSel)
Debug.Print "Result selected values = " + McToText(mcoLeft.SelectedValues(varSel))
Set varNotSel = McOpNot(varSel)
Debug.Print "Not Operation Selector Result = " + McToText(varNotSel)
Debug.Print "Result Not selected values = " + McToText(mcoLeft.SelectedValues(varNotSel))
See AlsoReference
McOpAnd
McOpOr
McOpNot