IMcOMGlobalMcOpFillIn Method
|
|
Arithmetic binary operator to fill-in concatenate two array variants.
Namespace:
MediaCy.IQL.ObjectManager
Assembly:
MediaCy.IQL.ObjectManager (in MediaCy.IQL.ObjectManager.dll) Version: 10.0.6912.0
SyntaxFunction McOpFillIn (
LeftOperand As Object,
RightOperand As Object
) As McObject
Parameters
- LeftOperand
- Type: SystemObject
Left operand. May be a scalar or array
of any integral 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 run from varLeftOperand filled in up to but
not including the first element of varRightOperand plus any other elements
of varRightOperand. The returned result will be of the integral arithmetic type of
varLeftOperand.
RemarksThe "fill-in concatenate" operator, McOpFillIn, is
used to create a run of integral values from a starting value up to (or down to)
an ending value. When used with scalar operands (one value to the left and one
value to the right), the result is a vector that starts with the left-hand value
and goes in steps of one up to (or down to), but does not include, the right
hand value.
The elements of the VARIANT varRightOperand are concatenated to the
VARIANT varLeftOperand after replacing the last value of varLeftOperand and the
first value of varRightOperand with the in the run of values between the from
the last element of varLeftOperand up-to but not including the first element of
varRightOperand (this run may be a zero length array, see Notes). The resulting
array is returned. This operator is basically for creating runs of numbers as
arrays. varLeftOperand must be an integral type.
One might intuitively the run of numbers to include the value of the right
operand. Why did we do it differently? The basic reason is that an
empty (zero length) array is potentially quite useful, since it can be used
to indicate that nothing is selected in some context.
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(1, 3)
varRight = Array(8, 20)
Set varResult = McOpFillIn( varLeft, varRight)
MsgBox( "Operation IMcObject Result = " + McToText(varResult))
MsgBox( "Result nDims: " + Str( varResult.Shape(mcobjSIC_NofDims)) + _
" Dim sizes: " + McToText( varResult.Shape(mcobjSIC_SizeAllDims)))
varResult = McOpFillIn( 1, 4)
MsgBox( "Operation Variant Result = " + McToText(varResult))
nValues = Val( InputBox("Enter N of Values in the array (0 is OK)."))
Set varResult = McOpFillIn(0, nValues)
MsgBox( "Length of Array Result = " + Str(varResult.VectorLength) )
See AlsoReference
IMcOMGlobalMcOpFillIn(Object, Object)