|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Arrays and Data-Structures > LST. - List Arrays > Store/Restore-Operations > Smart Package Robot 's List Commands |
MiniRobotLanguage (MRL)
LST.Store
Store the Container to a String
Intention
The LST.Store command is used to serialize and store the contents of a list container into a string. This is useful when you need to save the state of a list for later retrieval or transfer it between systems.
The serialized string contains all the data and structure of the list, allowing it to be reconstructed later using the LST.Load command.
Syntax
LST.Store|P1[|P2]
Parameter Explanation
P1 - The handle of the list container. This is a numeric value or a variable that contains the handle of the list.
P2 - The variable to store the serialized string. If omitted, the result is placed on the Top of Stack (TOS).
Example
'***********************************
' LST.Store Sample Script
'***********************************
' Create a new list container
LST.New|$$LST
' Add values to the list
LST.Add|$$LST|Apple
LST.Add|$$LST|Banana
LST.Add|$$LST|Cherry
' Store the list to a serialized string
LST.Store|$$LST|$$STR
' Display the serialized string
DBP.Serialized string: $$STR
' End the script
ENR.
Remarks
-
Limitations:
- The serialized string is specific to the SPR environment and cannot be directly used outside of it.
See also:
• LST.New - Create a New List Container
• LST.Import - Load a Serialized String into a List
• LST.Add - Add a Value to the List