<< Click to Display Table of Contents >> Navigation: 3. Script Language > Variable Definitions and Operations > Array -Commands > Array -Commands |
MiniRobotLanguage (MRL)
ARR.Clm Array
Clear Array and free Memory used by the Array
Intention
The ARR.CLM Array command is designed to clear all elements in a specified array and also free its reserved memory.
This is useful for completely resetting an array and releasing the memory it occupies, especially in long-running scripts where memory management is crucial.
All elements in the specified array are cleared, and the array's reserved memory is freed.
•Element Clearing: The command clears all elements in the specified array (P1).
•Memory Release: The reserved memory for the array is also freed, effectively resetting the array's dimensions.
•Automatic Cleanup: While this operation is not strictly necessary and will be done automatically when the script ends, it can be useful for memory management in long-running scripts.
Syntax
ARR.CLM Array|P1
ARR.CLM|P1
Parameter Explanation
P1 - Array Number: Specifies the array number, which can range from 0 to 32.
Speed in Ticks:
This command uses typically between 90 to 200 Ticks.
Example
'***********************************
' ARR.-Sample for clearing an array and freeing memory
'***********************************
ARR.CLM Array|5
' Clears all elements in Array 5 and frees its reserved memory
Remarks
-
Limitations:
-
See also:
•SDO.Arr----Small-Introduction-To-A
•Unpack-Array-from-File_Delimiter
•Unpack-Array-from-Var_Delimiiter