LST. - List Management

<< Click to Display Table of Contents >>

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

LST. - List Management

LST.PushFirst

Previous Top Next


 

MiniRobotLanguage (MRL)

 

LST.PushFirst

Add a value at the front of the List.

 

 

Intention

 

The LST.PushFirst command adds a value to the beginning of a List. This is useful when you need to prioritize certain items or maintain a specific order.

Unlike LST.Add, which appends to the end of the List, LST.PushFirst inserts the value at the front.

 

 

Syntax

 

 

LST.PushFirst|P1|P2

 

 

Parameter Explanation

 

P1 - (Variable)

 The handle of the List to which the value will be added.

P2 - (Value)

 The value to add at the front of the List.

 

 

Example

 

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

' LST.PushFirst - Sample

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

LST.New|$$LST

LST.Add|$$LST|World

LST.PushFirst|$$LST|Hello

LST.First|$$LST|$$RES

DBP.First item in List: $$RES

LST.End|$$LST

ENR.

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: