dataarrayinsert(
ARRAY
,
LOCATION
,
VALUE
)

The dataarrayinsert( function inserts one or more values into the middle of an existing array.


Parameters

This function has three parameters:

array – the initial data array to be modified.

location – the spot where the new elements should be inserted, starting with 1 for the first cell. The new values will be inserted just in front of this location.

value – value to insert into the array (this parameter may be repeated if you want to insert multiple values).


Description

This function inserts one or more values into the middle of an existing array. Suppose you have created a data array like this:

local myarray
myarray = dataarray("red","blue","orange")

You can use dataarrayinsert( to insert additional colors to the beginning of this array.

myarray = dataarrayinsert(myarray,1,"green","silver")

The end result is an array with five elements: green, silver, red, blue and orange.


Error Messages

dataarrayinsert( function: Invalid data array – The first parameter to this function must be a valid data array, created with dataarray(, importdataarray(, dataarraybuild(, etc.


See Also


History

VersionStatusNotes
10.0NewNew in this version.