|
<< 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 |
MiniRobotLanguage (MRL)
ARS.FileStore
Store the container to a file.
Intention
The ARS.FileStore command saves the contents of a container (e.g., a stack, queue, or deque) to a file. This allows the container's data to be persisted and later restored using ARS.FileRestore.
Illustration:
Container → File:
┌───────────────┐
│ Container Data│ → File
└───────────────┘
Syntax
ARS.FileStore|$$ARR|$$FILE
Parameter Explanation
P1 - $$ARR The handle of the container to store.
P2 - $$FILE The file path where the container data will be saved.
Example
'***********************************
' ARS.FileStore - 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 file
ARS.FileStore|$$CON|C:\ContainerData.dat
DBP.Container stored to file.
' End the script
ENR.
Remarks
-
Limitations:
- The file path must be valid and writable.
See also: