LST. - Management

<< Click to Display Table of Contents >>

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

LST. - Management

LST.To Que

Previous Top Next


MiniRobotLanguage (MRL)

 

LST.To Que

Copy a list to a new queue.

 

 

Intention

 

The LST.To Que command copies a list to a new queue.

This is useful when you need to work with the list elements in a queue format.

 

The elements will be copied to a new queue.
The original list handle will still be valid and all elements will be in the list as before.

 

Syntax

 

 

LST.To Que|P1|P2

 

 

Parameter Explanation

 

P1 - (Variable)

 The handle of the list to convert.

 

P2 - (optional, Variable)

 The variable to store the handle of the new queue.

 

 

Example

 

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

' LST.To Que - Sample

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

LST.New|$$LST

LST.Add|$$LST|1

LST.Add|$$LST|2

LST.Add|$$LST|3

LST.To Que|$$LST|$$QUE

QUE.Count|$$QUE|$$RES

DBP.Queue has $$RES items.

QUE.End|$$QUE

LST.End|$$LST

ENR.

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

   

 

 

 

Illustration

 

Before LST.To Que operation:

 

List: [1, 2, 3]

 

After LST.To Que operation:

 

Queue: [1, 2, 3]

 

The elements are copied to a new queue. The original list remains unchanged.