Variable Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Variable Definitions and Operations >

Variable Commands

VBA. -  Variable Binary Append

Previous Top Next


MiniRobotLanguage (MRL)

 

VBA. Command

Variable binary

 

 

Intention

 

This command can be used to append up to 21 variables into variable P1.

Normally you would think of doing an variable-append like this:

 

VAV.$$ALL=$$T01$$T02$$T03 .... etc.

 

This is going to work, as long as these variables do not contain any binary data that could resolve to special folders, variable or system-variables.

 

If that is the case, VAV. and such commands would try to resolve these binary patterns and possibly do unwanted changes to your data.

 

This is where VBA. enters the scene. VBA. will just resolve each parameter one time!

That is called "binary compatible variable resolution". BEcause the variable will be resolved, but the binary data is not going to be changed.

 

Then VBA. will append all those strings into P1.

 

If P1 was not empty, the content of P1 will will also be part of the new string.

If you do not want this, clear P1 before calling this command.

 

There are few thing to watch out for:

 

1. P1 will also be appended

2. You need to specify a variable for each parameter. It must be a variable.

   Additional characters which are not part of a variable name will have the command run

   into an (timeout) error.

3. You can specify up to 21 parameters, but you need to specify at least two parameters.

 

 

How do i clear a variable P1 before using VBA. ?

 

As VAB. does not go through any variable-resolution process, its possibly the fastest way to clear a variable.

 

' This will clear a variable

' Be sure that you do not have a SPACE behind the = sign.

VAB.$$TXT=

 

 

 

 

Syntax

 

VBA.P1|P2[|P3] ...[|PX]

 

 

Parameter Explanation

 

P1 - Variable-name of Source and Target variable

 

P2 - Variable which will be resolved and then appended to P1

 

P3 ... Px   - (optional) more variables that will be resolved (binary comaptible) and then appended to P1.

 

 

Example

 

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

' VBA.

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

: $$T01=Hallo

: $$T02=$sp$

: $$T03=Rolf

VBA.$$T01|$$T02|$$T03

DBV.$$T01

ENR.

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

 

 

 

Remarks

 

-

 

 

Limitations:

 

The overall maximum length of variables depend on your available RAM and your actual Memory fragmentation. String memory needs to be in one piece and can not be fragmented. As a raw assumption, 500 MB maximum size for strings should always be possible. If you stay below you should be on the safe side. The theoretical maximum is about ~2 GB.

 

 

 

See also:

 

    VAB. - Variable Binary

    VAC. - Variable reCt

    VAN. - Variable Numeric

    VAO. - Variable Once

    VAP: - Variable Point

    VAR. - Variable Set Value/Clear

    VAS. - Variable with String

    VAV. - Variables with Variables

    VBA. - Variable Binary Append

    CAL. - mathematical CALculation

    2.1 : - Definiton-Command