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 Delimiter/ ARR.pavd

Previous Top Next


MiniRobotLanguage (MRL)

 

ARR.Pack Array to Var Delimiter/ ARR.pavd

Packs the entire array into a variable.

 

 

Intention

 

The ARR.Pack Array to Var Delimiter command, also known as ARR.pavd, 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 Delimiter|P1|P2|P3

 

 

 

Syntax

 

 

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

ARR.Pavd|P1|P2[|P3]

 

 

 

Parameter Explanation

 

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

P2 - Delimiter-String   Should be a String that itself will NOT occur in the Arrays.

P3 - 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

' Delimiter

$$DEL=$crlf$

 

ARR.Set Array|0|1|Hello

ARR.Set|0|2|$$TXT

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

 

ARR.pavd|0|$$DEL|$$VAA

LEN.$$VAA|$$LEN

DBP. Lenght of packed Array is: $$LEN

 

' We unpack it to Array Nr.1

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

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