Array -Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Variable Definitions and Operations > Array -Commands >

Array -Commands

ARR.Get FP Array

Previous Top Next


MiniRobotLanguage (MRL)

 

ARR.Get FP Array

Retrieves the value of a specific element in a specified floating-point array.

 

clip0704

 

Intention

 

The ARR.Get FP Array command is designed to retrieve the value of a specific element in a specified floating-point array.

This is useful for accessing stored numerical data within an array, particularly when high precision is required.

 

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 an extended-precision floating-point number, offering 18 digits of precision and requiring 10 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 FP Array|P1|P2[|P3]

ARR.GFP|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:

 

clip0779

Putting the Result on TOS is even a bit faster then using a Variable.

 

Example

 

'***********************************

' ARR.-Sample for retrieving a floating-point array element

'***********************************

' Retrieves the 10th element of Floating-Point Array 5 and stores it in $$RES

ARR.Get FP Array|5|10|$$RES

 

 

 

Remarks

 

-

 

 

 

Limitations:

 

-

 

 

See also:

 

    VAB. - Variable Binary

    VAC. - Variable reCt

    VAN. - Variable Numeric

    VAO. - Variable Once

    VAP. - Variable Point

    VAR. - Variable Set Value/Clear

    VAS. - Variable with String

    VAV. - Variables with Variables

    VBA. - Variable Binary Append

    CAL. - mathematical CALculation

    2.1 : - Definiton-Command

 

See also:

ARR_---3D---Arrays

ARR_---4D---Arrays

SDO.Arr----Sample-Script

SDO.Arr----Small-Introduction-To-A

Append Array

Clm Array

Clr Array

Dim Array

Get Array

Get FP Array

Get INT Array

Pack-Array-to-File

Pack-Array-to-FileDelimiter

Pack-Array-to-Var

Pack-Array-to-Var

Send to AI

Set Array

Set FP Array

Set INT Array

Unpack-Array-from-File

Unpack-Array-from-File_Delimiter

Unpack-Array-from-Var

Unpack-Array-from-Var_Delimiiter