<< Click to Display Table of Contents >> Navigation: 3. Script Language > Variable Definitions and Operations > Array -Commands > Array -Commands |
MiniRobotLanguage (MRL)
ARR.Pack Array to File / ARR.paf
Packs the entire array into a file.
Intention
The ARR.Pack Array to File command, also known as ARR.paf, is designed to pack the entire array into a file.
This is useful for storing the state of an array for later use.
•Array Packing: The command packs the entire array specified by P1 into a file.
•File Storage: The packed array is stored in the file specified by P2, or in a temporary file if P2 is omitted.
•Array Copy/Backup: The Array can be unpacked using ARR.Unpack Array from File to the same or another Array-Number.
If you use another Array-Number you have effectively copied the Array.
Syntax
ARR.Pack Array to File|P1[|P2]
ARR.Paf|P1[|P2]
Parameter Explanation
P1 - Array Number: Specifies the array number, which can range from 0 to 32.
P2 - Filename (Optional): Specifies the filename where the packed array will be stored. If omitted, a temporary filename is generated in the ?exeloc\ directory.
After the operation the used file name is returned on TOS.
Example
'***********************************
' ARR.-Sample for packing an array into a file
'***********************************
' Packs Array 0 into a file using the short form ARR.paf
$$PAT==path\Arraydata.txt
ARR.paf|0|$$PAT
Remarks
-
Limitations:
-
See also:
•SDO.Arr----Small-Introduction-To-A
•Unpack-Array-from-File_Delimiter
•Unpack-Array-from-Var_Delimiiter