Description
Arithmetic binary operator to concatenate two array variants.
-
Return Type
-
A McObject object.
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.
-
Syntax
-
object.McOpConcat (LeftOperand, RightOperand)
The McOpConcat Method syntax has these parts: |
| object | An expression evaluating to an object of type McOMGlobal. | | LeftOperand | Required. A Variant value. Left operand. May be a scalar or array of any numeric type. It may also be an McObject instance of a numeric type.
| | RightOperand | Required. A Variant value. Right operand. May be a scalar or array of any numeric type. It may also be an McObject instance of a numeric type.
| 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.
Exceptions
Operands must scalars or arrays of some numeric type. Operands may be arrays of VARIANT, but if they are, all elements must be of the same arithmetic type. E.g., Array( 1, 2) is OK, but Array( 1.5, 2) is not legal.
|