The Int_var method sets and returns values of global variables of integer type.
The Int_var method uses the same storage as the Itv_var method, but modifies the type of variable to the integer type. |
Syntax for method invocation:
function Int_var (globalvar : String) : int |
Global variables are stored in the system registry to maintain their values after Windows restart. All global variables are stored in the registry branch HKEY_USERS\S-1-5-21-…\Software\VMSScript\VMSSCRIPT and HKEY_CURRENT_USER\Software\VMSScript\VMSSCRIPT. To access a global variable directly from the registry, search the registry for it by its name. |
Example. In the test example below, to check the method operation, the global variable named 2 is assigned a value of 1 that is then increases by 1 and is displayed in the debug window of the script.
if(Event.Action =="RUN") { Int_var(2) = 1; Int_var("2")++; DebugLogString(Int_var("2").toString()); } |