|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Arrays and Data-Structures > LST. - List Arrays > Cloning > LST. - List Management |
MiniRobotLanguage (MRL)
LST.Clone
Create a copy of an existing List.
Intention
The LST.Clone command creates an exact copy of an existing List.
The new List is independent of the original, meaning changes to one will not affect the other.
This is useful when you need to preserve the original List while working with a modified version.
The command returns a new Listhandle in P2 as if you had been calling LST.NEW.
Syntax
LST.Clone|P1|P2
Parameter Explanation
P1 - (Variable)
The handle of the List to clone.
P2 - (Variable)
The variable to store the handle of the cloned List.
Example
'***********************************
' LST.Clone - Sample
'***********************************
LST.New|$$LST
LST.Add|$$LST|Hello
LST.Add|$$LST|World
LST.Clone|$$LST|$$LS2
LST.Count|$$LS2|$$RES
DBP.Cloned List has $$RES items.
LST.End|$$LST
LST.End|$$LS2
ENR.
Remarks
-
Limitations:
-
See also:
•