|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Arrays and Data-Structures > Array -Commands > !FP-Arrays > Array -Commands |
MiniRobotLanguage (MRL)
ARR.Show FP
Show Array Element of an Floating Point Array for debugging

Output of the Test-Script.
Intention
The ARR.Show FP Array command is designed to help with debugging. It will just list all Array-Elements in a Console-Window.
Syntax
ARR.Show FP|P1
ARR.Shof|P1
Parameter Explanation
•P1 - Array Number: Specifies the array number, which can range from 0 to 32.
Example
'***********************************
' ARR.-Sample for setting a 64-bit integer array element
'***********************************
' Sets the 10th element of 64-bit Integer Array 5 to the maximum 64-bit integer value
ARR.Set INT Array|5|10|9223372036854775807
END.
'***********************************
' ARR.-Sample for setting multiple integer array elements
'***********************************
$$NUA=7
$$ELE=10,12,($$NUA*4),56,78,(99*4)
ARR.Sin|0|0|$$ELE
ARR.Get Dim|0|$$RET
ARR.Shoi|0
MBX.Array Dimension: $$RET
ENR.
Remarks
Inside the code, all Datatypes are stored "as String". Means, technically also the INT-Arrays and the FP-Arrays are String-Arrays.
Therefore you can use
' Fill Element 0 of Array Nr.1 with the INT-Value of "42" which is stored as an 8-Byte String (64-Bit)
' Set Array with an 64-bit signed Integer Value
ARR.Set INT Array|1|0|42
' Return Array Content as String
ARR.Get|1|0|$$RET
' This will return an Binary value that defines the 64-bit Signed-Integer value for "42"
MBX.$$RET
Therefore, if you know what you are doing, you can theoretically fill all even Array-Elements with INT Values,
and put in all odd Array-Values Strings (what ever). You can mix the Datatypes as long as you know what is in where.
You can also use another Array to index what Datatype is in which Array-Element and this way construct a mix of Elements.
Limitations:
-
See also:
• Insert
• Swap
• Delete