Modules

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Variable Definitions and Operations > MOD. - Modules >

Modules

MOD.Copy to

Previous Top Next


MiniRobotLanguage (MRL)

 

MOD.Copy to

Copy variables together with their type and content from the actual Module-Space to a specified Module.

 

 

Intention

 

You can use this command to copy one or multiple variables from the module where are now, to a Module specified in P1.

All the variables are copied together with their type and content, to the other Module-Space.

 

They will still be available in the module where they are now and they will exist in the Module specified in P1.

If there is a variable with this name already in the destination Module-Space, that Variable will be deleted.

 

Note that MOD.Copy to is generally slower than MOD.Move to.

As MOD.Move to will move the complete variable like a rename operation while MOD.Copy to will indeed Create a new Variable with the complete data in the target module space.

 

 

Syntax

 

 

MOD.Copy to|P1|P2

 

 

Parameter Explanation

 

P1 - Is the name or number of a Module where to copy the Variables in P2 to.

P2 - List with Variables that shall be moved to the last Module. There is no hard coded limitation on the number of Variables in that list.

        $$NAM=Other
        MOD.Copy to|$$NAM|$$VAA,$$VAB,$$VAC

 

 

clip0987

Here you can see some Speed Samples from the Script below.

 

 

 

Example

 

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

' MOD.Copy to - Sample

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

$$VAA=Its a A:

$$VAB=Its a B:

PRT.With $$VAA$crlf$$$VAB

MOD.New|Left

MOD.Main

GSB.Subr

'PRT.With $$VAA$crlf$$$VAB

DMP.gv

DMP.Sp

MBX.!

ENR.

'-----------------------------------------------------------

:Subr

MOD.Copy to|Left|$$VAA,$$VAB

MOD.Enter|Left

DMP.gv

$$VAA=$$VAA as expected

'PRT.With $$VAA$crlf$$$VAB

MOD.Get Last Name|$$LAS

MOD.Copy to|$$LAS|$$VAA,$$VAB

MOD.Return

RET.

 
clip0986

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: