|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Variable Definitions and Operations > MOD. - Modules > Modules |
MiniRobotLanguage (MRL)
MOD.Move Var
Move variables together with their type and content from a specified Module to a specified Module.
Intention
You can use this command to Move one or multiple variables from any specified module in P1, to any specified module in P2.
All the variables are Moved together with their type and content, to the destination Module-Space.
It does not matter in which Module-Space you currently are.
All moved variables will not be available in the module where they are now and they will only exist in the Module specified in P2.
If there is a variable with this name already in the destination Module-Space, that Variable will be deleted/overwritten - see Sample below.
Note that MOD.Copy Var is generally slower than MOD.Move Var.
As MOD.Move Var will move the complete variable like a rename operation while MOD.Copy Var will indeed Create a new Variable with the complete data in the target module space.
Syntax
MOD.Move Var|P1|P2|P3
Parameter Explanation
P1 - Is the name or number of a Module from where to move the Variables in P3 to.
P2 - Is the name or number of a Module where to move the Variables in P3 to.
P3 - 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.
MOD.Copy Var|$$SRC|$$DES|$$VAA,$$VAB,$$VAC

Here you can see some Speed Samples from the Script below.
Example
'***********************************
' MOD.Copy to - Sample
'***********************************
MOD.New|Layer 1
$$TXT=Bin in L1
MOD.New|Layer 2
$$TXT=Bin in L2
MOD.New|Layer 3
$$TXT=Bin in L3
MOD.Main
$$TXT=Bin in Main
MOD.Copy Var|Layer 1|Layer 2|$$TXT
DMP.gv
DMP.Sp
MBX.!
ENR.

We have overwritten the Value of the Layer 2 - Module with the Value from Layer 1 Module.
Remarks
-
Limitations:
-
See also:
•