Array.Insert(Variable, Variable) Method

Top 

Description

Inserts the value of variableToInsert into the calling Array at the index specified by variableIndex, increasing the dimension of the Array by one. Indexing starts at zero, so if the variableIndex is 0, variableToInsert will be added as the first element in the Array.

 

Timing Precision Mode

This page describes functionality in millisecond timing precision mode. Millisecond timing precision mode is deprecated and will be removed in a future release. We recommend that you migrate your Mission Plans to nanosecond timing precision mode.

Click here to see the documentation for this object in nanosecond timing precision mode.

 

Method Signature

Array.Insert(

Variable variableIndex,


Variable variableToInsert)

 

 

Arguments

variableIndex


Description:

The index at which to insert the value.

Valid Range:

variableIndex ≥ 0

 

 

variableToInsert


Description:

The numeric value to insert.

 

 

 

Return Value

Type:

number

 

 

Returns the new dimension of Array.

 

Syntax

myVariable1 = myArray1.Insert(myVariable2, myVariable3);

 

 

See also

Array Object

Matrix, Array, and Variable Math Guide