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.PopFirst

Previous Top Next


 

MiniRobotLanguage (MRL)

 

LST.PopFirst

Remove and retrieve the first value from the List.

 

 

Intention

 

The LST.PopFirst command removes the first value from the List and stores it in a variable. This is useful when you need to process items in a FIFO (First-In-First-Out) manner.

The List is modified, and the first item is permanently removed.

 

 

Syntax

 

 

LST.PopFirst|P1|P2

 

 

Parameter Explanation

 

P1 - (Variable)

 The handle of the List to pop from.

P2 - (Variable)

 The variable to store the popped value.

 

 

Example

 

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

' LST.PopFirst - Sample

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

LST.New|$$LST

LST.Add|$$LST|Hello

LST.Add|$$LST|World

LST.PopFirst|$$LST|$$RES

DBP.Popped value: $$RES

LST.Count|$$LST|$$COUNT

DBP.Items remaining: $$COUNT

LST.End|$$LST

ENR.

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: