ArrayAppend function (LotusScript® Language)
Appends an array or scalar value to an array and returns the result as an array.
Syntax
ArrayAppend( sourceArray1, source2 )
Elements
sourceArray1
An array.
source2
An array or scalar value.
Return value
An array of type Variant.
Usage
During this operation sourceArray1 and source2 are not modified. The sources can be of any type and do not have to be of the same type. The returned array is of type Variant. 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 source2.
For example:
sourceArray1(1 to 5) = [1,2,3,4,5]
source2(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:
- sourceArray1 is not an array
- an array with more than one dimension is used
ArrayAppend throws a Subscript out of range error if the array bounds of the constructed array are outside acceptable array limits.