<< Click to Display Table of Contents >> Navigation: 3. Script Language > Variable Definitions and Operations > Array -Commands > Array -Commands |
MiniRobotLanguage (MRL)
ARR.Unpack Array from File / ARR.uaf
Unpacks an array from a file.
Intention
The ARR.Unpack Array from File command, also known as ARR.uaf, is designed to unpack an array from a file.
This is useful for restoring the state of an array that was previously packed using ARR.Pack Array to File or ARR.paf.
•Array Unpacking: The command unpacks the array from the file specified by P2 and populates the array specified by P1.
•Array Restoration: This command essentially restores the state of an array that was previously packed.
Syntax
ARR.Unpack Array from File|P1|P2
ARR.Uaf|P1|P2
Parameter Explanation
•P1 - Array Number: Specifies the array number, which can range from 0 to 32. This is the array that will be populated with the unpacked data.
•P2 - Filename: Specifies the filename from which the packed array will be read. This file should have been previously saved using ARR.paf.
Example
'***********************************
' ARR.-Sample for unpacking an array from a file
'***********************************
' Unpacks the data from the file into Array 1 using the short form ARR.uaf
$$FIL=?path\Array.txt
ARR.uaf|1|$$FIL
ENR.
Remarks
-
Limitations:
File Integrity: Ensure that the file specified in P2 was previously packed using ARR.Pack Array to File or ARR.paf to avoid data corruption.
The command does not check the data that you feed into the command. Using corrupt data may have undefined consequences and may even kill the script process.
See also:
•SDO.Arr----Small-Introduction-To-A
•Unpack-Array-from-File_Delimiter
•Unpack-Array-from-Var_Delimiiter