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 Stack

Previous Top Next


MiniRobotLanguage (MRL)

 

LST.To Stack

Copy a list to a new stack.

 

 

Intention

 

The LST.To Stack command copies a list to a new stack.

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

 

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

 

Illustration

 

Before LST.To Stack operation:

 

List: [1, 2, 3]

 

After LST.To Stack operation:

 

Stack: [1, 2, 3]

 

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

 

 

Syntax

 

 

LST.To Stack|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 stack.

 

 

Example

 

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

' LST.To Stack - Sample

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

LST.New|$$LST

LST.Add|$$LST|1

LST.Add|$$LST|2

LST.Add|$$LST|3

LST.To Stack|$$LST|$$STK

STK.Count|$$STK|$$RES

DBP.Stack has $$RES items.

STK.End|$$STK

LST.End|$$LST

ENR.

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: