List-Operations

<< Click to Display Table of Contents >>

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

List-Operations

LST.Add - Append a Value to the End of the List

Previous Top Next


MiniRobotLanguage (MRL)

 

LST.Add

Append a value to the end of a List-Array.

 

 

Intention

 

The LST.Add command allows you to append a value to the end of a specified list-array.

This operation expands the list by adding the provided value as the last element.

  The data type of the value being appended must match the data type of the list-array. Mismatched types will result in an error.

  The list handle must be valid for the operation to succeed.

 

 

Syntax

 

 

LST.Append|P1|P2

LST.Add|P1|P2

 

 

Parameter Explanation

 

P1 - (Variable)  This variable contains the handle of the list-array to which the value will be appended.

 

P2 - (Variable)  This variable contains the value to append to 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.Add|$$LST|42

DBP.Value 42 appended to the list.

LST.Add|$$LST|"Hello"

DBP.String "Hello" appended to the list.

ENR.

 

 

 

 

 

Remarks

 

  -

 

 

Limitations:

 

-

 

 

See also: