List-Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Arrays and Data-Structures > LST. - List Arrays > List-Operations >

List-Operations

LST.Insert

Previous Top Next


MiniRobotLanguage (MRL)

 

LST.Insert

Insert a value at the front of a List-Array.

 

 

Intention

 

The LST.Ins command allows you to insert a value at the beginning of a specified list-array.

This operation shifts all existing elements in the list to make room for the new value as the first element.

 

 

Syntax

 

 

LST.Ins|P1|P2  

LST.Insert|$$LST|$$VAL

 

 

 

Parameter Explanation

 

P1 - (Variable) This variable contains the handle of the list-array where the value will be inserted.

 

P2 - (Variable) This variable contains the value to insert at the front of the list-array. The data type of the value must match the data type of the list-array (String, Integer, or FP).

 

 

Example

 

'***********************************

' LST.-Sample

'***********************************

LST.New|$$LST

DBP.New list created with this Handle: $$LST

LST.Ins|$$LST|100

DBP.Value 100 inserted at the front of the list.

LST.Ins|$$LST|"First"

DBP.String "First" inserted at the front of the list.

ENR.

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: