Variables and Constants
All script variables are text strings, however they can also be used to store numbers (integer or floating point), boolean values, or arrays. There is no practical size limit for variable names or their contents.
Boolean values considered to be "true" if they contain "TRUE", "YES", or "ON" - case is not important, otherwise they are considered to be "false".
Before each line of a script is executed, its variables are evaluated to their values before the line is executed. Variables and constants are indicated by preceding the variable name with the "$" character.
If a variable name is preceded by two "$" characters, the variable name itself becomes a variable which is in turn evaluated. For example, if the variable "TEXT" contains "VARIABLE1" then the expression "$$TEXT" would be converted to the value of VARIABLE1.
If a variable is read that does not exist, it returns "BAD_VARIABLE".
The types of variables and constants available, and how to use them, are as follows: