|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Variable Definitions and Operations > MOD. - Modules > Modules |
MiniRobotLanguage (MRL)
MOD.Move from Last
Copy variables together with their type and content from the last module to this module
Intention
You can use this command to move one or multiple variables from the module where you have been before to this module where you are now.
All the variables are moved/renamed together with their type and content, to the new Modul-Space.
They will not be available in the module where they were before and they will exist as a copy in this module where you are now.
If there is a variable with this name already in this Module-Space, that Variable will be deleted.
Note that MOD.Copy from last is a lot slower than MOD.Move from last.
As MOD.Move from last will move the complete variable like a rename operation while MOD.Copy from last will indeed Create a new Variable with the complete data in this 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 out again using MOD.Move to Last .
Syntax
MOD.Move from Last|P1
Parameter Explanation
P1 - List with Variables that shall be moved to the current Module. There is no hard coded limitation on the number of Variables in that list.
MOD.Move from Last|$$VAA,$$VAB,$$VAC

Here you can see some Speed Samples from the Script below.
Example
'***********************************
' MOD.Move from 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.Move to Last|$$VAA,$$VAB
MOD.Return
RET.

Remarks
-
Limitations:
-
See also:
•