LOTUSSCRIPT LANGUAGE


ArrayAppend function
Appends one array to the end of another array and returns the result as a third array.

Syntax

ArrayAppend( sourceArray1, sourceArray2 )

Elements

sourceArray1


sourceArray2
Return value

A variant containing an array.

Usage

During this operation sourceArray1 and sourceArray2 are not modified. If the two arrays are arrays of matching types, the returned array will be of that type. Otherwise, the returned array will be an array of Variants. The lower bound of the returned array is the same as the lower bound of sourceArray1, and the upper bound is the combined total of sourceArray1 and sourceArray2.

For example:

sourceArray1(1 to 5) = [1,2,3,4,5]

sourceArray2(1 to 8) = [1,3,6,9,12,15,18,21)

returned array (1 to 13) = [1,2,3,4,5,1,3,6,9,12,15,18,21)

Error handling

ArrayAppend throws a Type mismatch error if:


ArrayAppend throws a Subscript out of range error if the array bounds of the constructed array are outside acceptable array limits.

Extended examples: array and String functions

See Also