Maptitude GISDK Help

InsertArrayElements()

Summary

Inserts elements into an array.

 

Syntax

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

 

Returns

An array containing the elements of my_array, with the elements of to_insert added at the specified position.

 

Notes

Example

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 Codes

Error Type

Meaning

Error

Start is less than one

 

See Also

Function

Summary

ArrayExclude()

Excludes elements from an array

ArrayIntersect()

Creates an array that contains the elements of the array a that are also in array b

ExcludeArrayElements()

Removes elements from an array

Subarray()

Extracts a subset of an array

 

 

©2025 Caliper Corporation www.caliper.com