Click or drag to resize

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
Syntax
VB
Function 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: McObject
A 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.
Remarks
The "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.
Examples
VB
varLeft = Array(1, 3)
varRight = Array(8, 20)
Set varResult = McOpFillIn( varLeft, varRight) ' Set keeps it an McObject
' Show Operation McObject Result = 1,3,4,5,6,7,20
MsgBox( "Operation IMcObject Result = " + McToText(varResult))
' Show Result nDims: 1 Dim sizes: -7
MsgBox( "Result nDims: " + Str( varResult.Shape(mcobjSIC_NofDims)) + _
" Dim sizes: " + McToText( varResult.Shape(mcobjSIC_SizeAllDims)))
' Simple fill in
varResult = McOpFillIn( 1, 4) ' access Value Variant
MsgBox( "Operation Variant Result = " + McToText(varResult)) ' 1,2,3
' Have user specify the length of the run
nValues = Val( InputBox("Enter N of Values in the array (0 is OK)."))
Set varResult = McOpFillIn(0, nValues) ' Start and End of fill may be the same
MsgBox( "Length of Array Result = " + Str(varResult.VectorLength) ) ' nValues
See Also

Reference

IMcOMGlobalMcOpFillIn(Object, Object)