Global variables
Global variables are declared outside any subroutine or function using the Dim or Global statements and are accessible throughout the entire script. In addition, when a script ends execution, Global variables are stored in the Bzshvars.ini file, located in the BlueZone working directory. Subsequent running of scripts that use referenced Global variables have their values initialized to the stored values before script execution. This allows for variable sharing across multiple instances of the script host. A Global variable must be initialized in the script if it does not want to use the stored value.
Global variables are cleared when the last instance of a BlueZone emulator session is closed, or if the Bzshvars.ini file is deleted.
For example:
Dim x As Integer
Sub Main
   MsgBox x
   x = 10
End Sub
A message box displays 0 the first time the script is run and 10 on subsequent running of the script.