<< Click to Display Table of Contents >> Navigation: 3. Script Language > Variable Definitions and Operations > Variable Commands |
MiniRobotLanguage (MRL)
VAN. Command
Variable numeric
Intention
This command can be used to assign a numeric Value or a formula in ( ) to a Variable.
Specialfolders are not resolved. Systemvariables are resolved.
Also VAN. will do a numeric resolution which possibly includes calculations, that makes it slower then VIN. or VFP.
'This will set the variable to zero:
VAN.$$ABC=0
You can assign Hexadezimal, octal or binary, floating point and negative numbers to a variable using VAN.
' Hexadezimal assignement
VAN.$$ABC=&h90
' Binary assignement
VAN.$$ABC=&B0100101101
' Octal assignement
VAN.$$ABC=&O4574514
You can assign the result of a formula to a variable using VAN.
' This will assign the result to the variable
VAN.$$ABC=(4*5.1+(8*8))
' Negative numbers and floating point numbers
VAN.$$ABC=-25.004*
' use System-variables
VAN.$$XPO=#iw#*2
Syntax
VAN.P1=P2
Parameter Explanation
P1 - Variable-name
P2 - Value/formula in (..) that will be assigned to the variable.
If P2 is omitted, the variable will be set to empty.
Speed in Ticks:
This command uses typically around 90 Ticks.
Example
'**********************************
' VAN.
'**********************************
'This will set the variable to zero:
VAN.$$ABC=0
' This will assign the result to the variable
VAN.$$ABC=(4*5.1+(8*8))
VAN.$$ABC=-25.004
' Hexadezimal assignement
VAN.$$ABC=&h90
' Binary assignement
VAN.$$ABC=&B0100101101
' Octal assignement
VAN.$$ABC=&O4574514
END.
'**********************************
Remarks
-
Limitations:
Binary, octal and hexadezimal numbers can not be negative and they can not be floating point numbers.
See also:
• VAR. - Variable Set Value/Clear
• VAV. - Variables with Variables
• VBA. - Variable Binary Append
• CAL. - mathematical CALculation