String Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > String commands >

String Operations

CAT. Concatenate Strings

Previous Top Next


MiniRobotLanguage (MRL)

 

CAT. - Concatenate Strings

Concatenate up to 25 Strings

 

clip0898

Concatenation of many Strings can become very fast using the CAT.-Command.

 

 

Intention

 

  While you can easily concatenate Variables like this:

  VAR.$$MAA=$$A01$$A02$$A03

' And also

  VAR.$$MAA+$$A04$$A05$$A06

 

  For larger Strings and many Strings, the fastest way to do it is the new CAT.-Command.

 

  CAT.$$MAA|$$A01|$$A02|$$A03|$$A04

 

It will speed up the concatenation of  up to 25 long String-Variables significantly.

Do not use it for very short strings, as in this case the normal Concatenation is faster.

 

clip0899

The new CAT. - Command is optimized for Speed. Here you can see the Speed advantage (4770 <> 962).

 

 

clip0897

The new CAT. - Command is optimized for Speed. Yet this can only work out if you work with longer Strings. With short strings the result is rather poor, therefore use the conventional Concatenation.

 

 

Syntax

 

 

CAT.P1|P2[|P3 ... |P25]

 

 

Parameter Explanation

 

P1 - Main Variable, will also contain the Result.

P2 - Variable that will all be concatenated to P1

P3 - .. P25 -  more Variables that will all be concatenated to P1

 

 

 

 

Example

 

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

' CAT.-Sample

'***********************************
$$REP=Hallo 

STR.Clone|$$A01|1000|$$REP

STR.Clone|$$A02|1000|$$REP

$$AAA=Hallo 

VAR.$$A01+$$A02$$A02$$A02$$A02$$A02

CAT.$$AAA|$$A02|$$A02|$$A02|$$A02|$$A02

DMP.Speed

MBX.$$A01

ENR.

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: