Smart Package Robot 's List Commands

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

LST.Restore - Restore the Container from a String

Previous Top Next


MiniRobotLanguage (MRL)

 

LST.Restore

Restore the Container from a String

 

 

Intention

 

The LST.Restore command is used to restore the contents of a list container from a serialized string. This is useful when you need to reconstruct a list that was previously saved using the LST.Store command.

The serialized string contains all the data and structure of the list, allowing it to be fully restored to its original state.

 

 

Syntax

 

LST.Restore|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 serialized string to restore the list from. This can be a string or a variable containing the string.

 

 

Example

 

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

' LST.Restore 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

' Clear the list

LST.Clear|$$LST

' Restore the list from the serialized string

LST.Restore|$$LST|$$STR

' Display the restored values

LST.Get|$$LST|1|$$VAL1

LST.Get|$$LST|2|$$VAL2

LST.Get|$$LST|3|$$VAL3

DBP.Restored values: $$VAL1, $$VAL2, $$VAL3

' End the script

ENR.

 

 

Remarks

 

-

 

 

Limitations:

- The serialized string must be generated using the LST.Store command. Using an invalid or corrupted string may result in errors.

 

See also:

 

LST.New - Create a New List Container

LST.Store - Store the Container to a String

LST.Clear - Clear the List Container