Array -Commands

<< Click to Display Table of Contents >>

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

Array -Commands

ARR.Unpack Array from Var Delimiter / ARR.uavd

Previous Top Next


MiniRobotLanguage (MRL)

 

ARR.Unpack Array from Var Delimiter / ARR.uavd

Unpacks binary data from a variable into a specified array.

 

 

Intention

 

The ARR.Unpack Array from Var Delimiter command is designed to unpack binary data from a variable and populate a specified array with it.

This is useful for restoring the state of an array that was previously packed using ARR.Pack Array to Var.

You can also unpack the Data into another Array and this way copy the whole Array in one Task.

 

Array Unpacking: The command unpacks the binary data in the variable specified by P2 and populates the array specified by P1.

Data Types: The unpacked data will populate the array in its original format and with the original dimension.

Array Restoration: This command essentially restores the state of an array that was previously packed.

Array Copy: The original Array is not deleted in the process, if you unpack the Variable into another Array, you can copy an complete Array into another Array (Backup).

 

 

 

Syntax

 

 

ARR.Unpack Array from Var Delimiter|P1|P2|P3

 

 

 

Parameter Explanation

 

P1 - Array Number: Specifies the array number, which can range from 0 to 32. This is the array that will be populated with the unpacked data.

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

P3 - Input Variable: Specifies the variable that contains the packed array data. This variable should contain binary data that was previously packed using ARR.Pack Array to Var.

          There is no defined way to generate this Data in another way then using this command.

 

 

 

Speed in Ticks:

 

clip0785

 

 

Example

 

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

' ARR.-Sample for unpacking an array from 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|$$DEL|$$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