Modules

<< Click to Display Table of Contents >>

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

Modules

MOD.Copy to Last

Previous Top Next


MiniRobotLanguage (MRL)

 

MOD.Copy to Last

Copy variables together with their type and content from the actual Module-Space to the Module where you came from.

 

 

Intention

 

You can use this command to copy one or multiple variables from the module where are now, to the Module where you have been before.

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 where you was before.

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

 

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

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

You can use MOD.Move from Last to move a Variable into a new Module-Space and at the end of the Module just Move it back using MOD.Move to Last .

 

 

 

Syntax

 

 

MOD.Copy to Last|P1

 

 

Parameter Explanation

 

P1 - List with Variables that shall be copied to the last Module. There is no hard coded limitation on the number of Variables in that list.
        MOD.Copy to Last|$$VAA,$$VAB,$$VAC

 

 

clip0981

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

 

 

 

Example

 

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

' MOD.Copy to Last-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.Enter|Left

MOD.Move from Last|$$VAA,$$VAB

DMP.gv

$$VAA=$$VAA as expected

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

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

MOD.Return

RET.

 

clip0982

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: