Array -Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Arrays and Data-Structures > Array -Commands > !INT-Arrays >

Array -Commands

ARR.Show INT

Previous Top Next


MiniRobotLanguage (MRL)

 

ARR.Show INT

Show Array Element of an Integer Array for debugging

 

clip1032

Output of the Test-Script.

 

 

Intention

 

The ARR.Show INT Array command is designed to help with debugging. It will just list all Array-Elements in a Console-Window.

 

 

Syntax

 

ARR.Show INT|P1

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

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