<< Click to Display Table of Contents >> Navigation: 3. Script Language > Variable Definitions and Operations > Array -Commands > Array -Commands |
MiniRobotLanguage (MRL)
ARR.Get INT Array
Get Integer Element out of Array
Intention
The ARR.Get INT Array command is designed to retrieve the value of a specific element in a specified 64-bit integer array.
This is useful for accessing stored numerical data within an array, particularly when only integer values are needed and 8 bytes of storage are available for each element.
•Element Retrieval: The command retrieves the value of the element at the specified index (P2) in the specified array (P1).
•Data Types: The value retrieved will be a 64-bit integer, requiring 8 bytes of storage.
•Result Placement: If P3 is omitted, the value of the element is placed on the TOS.
•Auto Stop: If you specify an Index that has not been set with an Element, the result will be 0.
Syntax
ARR.Get INT Array|P1|P2[|P3]
ARR.Gin|P1|P2[|P3]
Parameter Explanation
•P1 - Array Number: Specifies the array number, which can range from 0 to 32.
•P2 - Array Index: Specifies the index of the element within the array that you want to retrieve.
•P3 - Output Variable (Optional): Specifies the variable that will receive the value of the element at the given index. If omitted, the result is placed on the Top Of Stack (TOS).
Speed in Ticks:
Example
'***********************************
' ARR.-Sample for retrieving a 64-bit integer array element
'***********************************
' Retrieves the 10th element of 64-bit Integer Array 5 and stores it in $$RES
ARR.Get INT Array|5|10|$$RES
END.
Remarks
-
Limitations:
-
See also:
• VAR. - Variable Set Value/Clear
• VAV. - Variables with Variables
• VBA. - Variable Binary Append
• CAL. - mathematical CALculation
See also:
•SDO.Arr----Small-Introduction-To-A
•Unpack-Array-from-File_Delimiter
•Unpack-Array-from-Var_Delimiiter