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.