Maptitude GISDK Help |
Inserts elements into an array.
new_array = InsertArrayElements(array my_array, integer start, array to_insert)
Argument |
Contents |
my_array |
The array to which elements are added |
start |
The position before which the new elements are added |
to_insert |
The array of elements to insert |
An array containing the elements of my_array, with the elements of to_insert added at the specified position.
If start is null, InsertArrayElements() inserts the new elements at the beginning of my_array. If start is larger than the number of elements in my_array, InsertArrayElements() inserts the new elements at the end of my_array.
Either my_array or to_insert, or both, can be null.
InsertArrayElements() does not modify my_array; it creates a new array containing additional elements.
x = {1, 2, 3, 6}
y = {4, 5}
z = InsertArrayElements(x, 4, y) |
// z is {1, 2, 3, 4, 5, 6} |
x = InsertArrayElements(x, 4, {4, 5}) |
// now x = z |
Error Type |
Meaning |
Error |
Start is less than one |
Function |
Summary |
Excludes elements from an array |
|
Creates an array that contains the elements of the array a that are also in array b |
|
Removes elements from an array |
|
Extracts a subset of an array |
©2025 Caliper Corporation | www.caliper.com |