<< Click to Display Table of Contents >> Navigation: 3. Script Language > Variable Definitions and Operations > Variable Commands |
MiniRobotLanguage (MRL)
VIN. Command
Variable Integer (Quad / 8 Byte)
Intention
This command can be used to assign a large Integer numeric Value to a Variable.
Such Variables have a theoretical Range of -9.22x10^18 to 9.22x10^18 ( -2^63 to 2^63 -1).
Unlike VAN. using VIN. will not resolve formulas.
Because of this VIN. is much faster.
Also it will generate a Variable of Type "INT" (Type 4 see GVT.) to prevent rounding Errors.
Specialfolders are not resolved. Systemvariables are not resolved.
Also VIN. will not do a numeric resolution which possibly includes calculations, that makes it faster then VAN..
VIN. Was designed to make a faster Command and to make sure you get a INT.-Type 4 Variable to prevent rounding Errors.
VAR, will generally make a Type 1 . String Variable.
'This will set the variable to zero:
VIN.$$ABC=0
VIN.$$ABC=
You can assign Hexadezimal, octal or binary, floating point and negative numbers to a variable using VIN.
' Hexadezimal assignement
VIN.$$ABC=&h90
' Binary assignement
VIN.$$ABC=&B0100101101
' Octal assignement
VIN.$$ABC=&O4574514
' Negative numbers are possible and floating point numbers will lose anything after the "."
VIN.$$ABC=-25.004
' Do not use System-variables with VIN.
VIN.$$XPO=#iw#*2
You can not assign the result of a formula to a variable using VIN.
' This will not work and therefore assign the value of zero to the variable
VIN.$$ABC=(4*5.1+(8*8))
Concatenation will work with VIN.
Syntax
VIN.P1=P2
VIN.P1+P2
Parameter Explanation
P1 - Variable-name
P2 - Value/or Variable that will be assigned to the variable.
If P2 is omitted, the variable will be set to "0".
Speed in Ticks:
This command uses typically between 50 and 240 Ticks (using append feature is slower).
Example
'**********************************
' VIN.
'**********************************
'This will set the variable to zero:
VIN.$$ABC=0
VIN.$$ABC=-25.004
' Hexadezimal assignement
VIN.$$ABC=&h90
' Binary assignement
VIN.$$ABC=&B0100101101
' Octal assignement
VIN.$$ABC=&O4574514
' This will not work and assign "0" to the variable
' Because VIN. deos not make calculations
VIN.$$ABC=(4*5.1+(8*8))
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