<< Click to Display Table of Contents >> Navigation: 3. Script Language > Variable Definitions and Operations > Variable Commands |
MiniRobotLanguage (MRL)
VAR. Command
VARiable set value or clear
Intention
This command can be used to assign a Value to a Variable.
There are three forms, please look at the examples.
The VAR.-command makes a complete variable-resolution, this includes any special-folder or system-variables on the value-side.
Therefore it may be a bit less efficient then the VAB. command, which does not make a variable resolution.
There is an "Implicit VAR."-Command, from the preprocessor, if you just omit the VAR. and write:
$$AAA=12
§§BBB=99
In this case, the Preprocessor will just add the "VAR." in front of the Line for you. Therefore at runtime the Line would look like this:
VAR.$$AAA=12
VAR.§§BBB=99
To get a complete resolution of the target side, including formulas, you can use
the 2.1 : - Definiton-Command .
Syntax
VAR.[P1]=[P2]
Parameter Explanation
P1 - Variable-name
P2 - Value that will be assigned to the variable. If P2 is omitted,
the variable will be set to empty.
Example
'This will clear the variable:
VAR.$$ABC=
' This will assign the variable a value or string and replace all special-folders
' and systemvariables:
VAR.$$ABC=Hallo
' This will assign a Value without Specialfolder-Processing
: $$ABC=Hallo
Remarks
-
Limitations:
-
See also:
• VAR. - Variable Set Value/Clear
• VAV. - Variables with Variables
• VBA. - Variable Binary Append
• CAL. - mathematical CALculation