ARS. - Store/Restore Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Arrays and Data-Structures > ARS. - Array's > !ARS. - Store/Restore Operations >

ARS. - Store/Restore Operations

ARS.Store

Previous Top Next


MiniRobotLanguage (MRL)

 

ARS.Store

Store the container to a string.

 

 

Intention

 

The ARS.Store command converts the contents of a container (e.g., a stack, queue, or deque) into a string representation. This allows the container's data to be easily transferred or stored as a string, which can later be restored using ARS.Restore.

 

 

Illustration:

Container → String:

┌───────────────┐

│ Container Data│ → String

└───────────────┘

 

Syntax

 

ARS.Store|$$ARR[|$$STRING]

 

 

Parameter Explanation

 

P1 - $$ARR The handle of the container to store.

P2 - $$STRING (optional) The variable to store the string representation of the container data. If omitted, the string is placed on the Top of Stack (TOS).

 

 

Example

 

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

' ARS.Store - Sample Script

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

' Create a new container

ARS.New|$$CON

' Add data to the container

ARS.Push|$$CON|Data1

ARS.Push|$$CON|Data2

' Store the container to a string

ARS.Store|$$CON|$$STRING

DBP.$$STRING

' End the script

ENR.

 

 

Remarks

 

-

 

 

Limitations:

- The container must not be empty when using this command.

 

See also:

 

ARS.FileStore

ARS.Restore