Click or drag to resize

IMcOMGlobalMcOpConcat Method

Arithmetic binary operator to 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 McOpConcat ( 
	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: McObject
A McObject instance holding varLeftOperand extended by varRightOperand. The returned result will be of the arithmetic type of varLeftOperand. It will be an array with a VectorLength the sum of that of the varLeftOperand and the varRightOperand.
Remarks
The elements of the VARIANT varRightOperand are concatenated to the VARIANT varLeftOperand and the resulting array is returned. This operator is basically for concatenating scalars or 1-dimensional arrays. Use the McOpConcatConcat to add "Rows" to a 2-dimensional array. 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, 2, 3)
varRight = Array(10, 20, 30)
Set varResult = McOpConcat( varLeft, varRight) ' Set keeps it an McObject
' Show Operation McObject Result = 1,2,3,10,20,30
MsgBox( "Operation IMcObject Result = " + McToText(varResult))
' Show Result nDims: 1 Dim sizes: -6
MsgBox( "Result nDims: " + Str( varResult.Shape(mcobjSIC_NofDims)) + _
" Dim sizes: " + McToText( varResult.Shape(mcobjSIC_SizeAllDims)))
' Assign without "Set" to convert it to a numeric Variant
varResult = McOpConcat( varLeft, varRight) ' access Value Variant
MsgBox( "Operation Variant Result = " + McToText(varResult)) ' Same as above
See Also

Reference

IMcOMGlobalMcOpConcat(Object, Object)