Description

Arithmetic binary operator to fill-in concatenate two array variants.

Return Type

A McObject object.  

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.

Syntax

object.McOpFillIn (LeftOperand, RightOperand)

The McOpFillIn Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McOMGlobal.
LeftOperandRequired. A Variant value.

Left operand. May be a scalar or array of any integral type. It may also be an McObject instance of a numeric type.

RightOperandRequired. 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 “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.

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. varLeftOperand must be an integral type.