Array -Commands

<< Click to Display Table of Contents >>

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

Array -Commands

ARR.Pack Array to Var / ARR.pav

Previous Top Next


MiniRobotLanguage (MRL)

 

ARR.Pack Array to Var / ARR.pav

Packs the entire array into a variable.

 

 

Intention

 

The ARR.Pack Array to Var command, also known as ARR.pav, is designed to pack the entire array into a variable.

This is useful for storing the state of an array for later use. The packed data is binary and should be handled carefully.

 

Array Packing: The command packs the entire array specified by P1 into a Variable, in binary format.

Data Types: The packed data is binary and should be handled with care, especially because it may contain accidental variable names.

Result Placement: If P2 is omitted, the packed array is placed on the TOS.

 

 

To restore the Packed Array from the Variable, use:

 

ARR.Unpack Array from Var|P1|P2

 

 

 

Syntax

 

 

ARR.Pack Array to Var|P1[|P2]

ARR.Pav|P1[|P2]

 

 

 

Parameter Explanation

 

P1 - Array Number: Specifies the array number, which can range from 0 to 32.

P2 - Output Variable (Optional): Specifies the variable that will receive the packed array. If omitted, the packed array is placed on the TOS.

 

 

 

Speed in Ticks:

 

clip0786

 

Example

 

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

' ARR.-Sample for packing an array into a variable

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

VAR.$$TXT=Hallo Peter und Paul!

ARR.Dim|0|10

 

ARR.Set Array|0|1|Hello

ARR.Set|0|2|$$TXT

ARR.Set Array|0|10|$$TXT

 

ARR.pav|0|$$VAA

LEN.$$VAA|$$LEN

DBP. Lenght of packed Array is: $$LEN

 

' We unpack it to Array Nr.1

ARR.Unpack Array From Var|1|$$VAA

ARR.Get Array|1|1|$$TXA

MBX.$$TXA

ENR.

 

 

 

 

 

 

Remarks

 

-

 

 

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