IMcOMGlobalMcOpLargerOf Method
|
|
Arithmetic binary operator to compute the larger of elements of two variants.
Namespace:
MediaCy.IQL.ObjectManager
Assembly:
MediaCy.IQL.ObjectManager (in MediaCy.IQL.ObjectManager.dll) Version: 10.0.6912.0
SyntaxFunction McOpLargerOf (
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. - 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.
Return Value
Type:
McObjectA McObject instance holding the result. 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).
RemarksThe elments of the VARIANT varRightOperand are compared to those of
the VARIANT varLeftOperand and the larger of each result is returned.
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.
ExamplesvarLeft = Array( Array(1,2,3), Array(10,20,30))
varRight = Array( 1, 6, 2)
Set varResult = McOpLargerOf( varLeft, varRight)
MsgBox( "Operation IMcObject Result = " + McToText(varResult))
MsgBox( "Result nDims: " + Str( varResult.Shape(mcobjSIC_NofDims)) + _
" Dim sizes: " + McToText( varResult.Shape(mcobjSIC_SizeAllDims)))
varResult = McOpLargerOf( varLeft, varRight)
MsgBox( "Operation Variant Result = " + McToText(varResult))
See AlsoReference
IMcOMGlobalMcOpLargerOf(Object, Object)