[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = Command return, with an 'if' statement used it will be TRUE (1) if condition passes or FALSE (0) if it fails, otherwise if you use a 'Variable', this variable will contain a 'pointer' to the information being stored in the global variable.
<Var/String> = The string that was previously set as the name for the information, this can be read in from a text file or entered directly as a string.
Returns the value of a previously set global variable (see: set global variable).
If the global variable was not previously set, then this instruction returns null.
<RetVar/IF> is not the actual data that was saved to the global variable, but rather a 'pointer' to its location in memory. Altering this value does not alter the information it points to. The pointer must be redirected to the altered value for this to take effect.
$info.being.stored = get global variable name = 'my_global_variable_name'
This command retrieves the stored information and stores it in $info.being.stored .
if -> get global variable name = 'my_global_variable_name'
| write to logbook = 'This global variable exists'
else if not -> get global variable name = 'my_global_variable_name'
| write to logbook = 'This global variable does not exist'
Using the 'Conditional' statement 'if' does not actually retrieve the information being stored, it just checks to see if the global variable <Var/String> exists.
Another useful command that can be used as a substitute for 'write to logbook' as used in the above example is the command,
display subtitle text: text = <Var/String> duration = <Var/Number> ms
Global Variables by Cycrow.
- »» General Commands
<RetVar/IF> = get global variable name = <Var/String>