Scripta allows the use of up to 300 variables, each of which
may be of type INTEGER, STRING, BOOLEAN or FILE. In general, a
variable takes on the type of the last value that was placed in
it; how that value is used, depends upon the context in which
it is used.

An exception to the general rule is that variables of type FILE
may not be assigned values of other types as long as the real
DOS file associated with the FILE variable remains open.

A variable name is composed of a percentage symbol followed by
from one to eleven alphabetic characters. Variable names are
not case sensitive - the names %MYVAR, %myvar and %MyVar all
refer to the same variable. Variable names longer than 12
characters (including the % character) may be used but only the
first 12 characters are treated as significant.

For example, the names %VeryLongNameA and %VeryLongNameB each
refer to a single variable named %VeryLongNam.

Values may be given to variables using Scripta assignment
statements.

These have the general form

              <variable_name> := <value>

Note that no space characters are permitted between the colon
and the equals sign. The character pair := is treated as a
single symbol (which is read as 'becomes equal to').

The right hand side, the <value>, of an assignment statement is
evaluated according to its first few characters. If the initial
character is a quotes character then the whole value is treated
as a string literal. If the initial character is one of the
following then the right hand side is treated as an INTEGER
expression:

    ~ + - ( % $ 0 1 2 3 4 5 6 7 8 9

If the right hand side consists of either of the single words
TRUE or FALSE then the value is treated as the BOOLEAN value
TRUE or FALSE.

If the right hand side starts with either of the words GETFIRST
or GETNEXT then the GETFIRST or GETNEXT command is evaluated to
produce one of the BOOLEAN values TRUE or FALSE.

If the initial character is F then the right hand side is
evaluated as a FILE command (see below) unless the right hand
side has already been found to be the simple BOOLEAN value
FALSE.

The main thing to beware of is assigning the value of one
string variable to another. For instance, the system variable %
CURRDIR always contains the name of the current directory.
Therefore, you might expect to be able to use a command such as

              %mydir := %CURRDIR

to set %mydir to the name of the current directory.

In fact, this would give rise to an error message. Because the
right hand side of the assignment statement begins with a %
character, the whole right hand side is treated as an INTEGER
expression. No INTEGER variable exists called %CURRDIR so the
statement fails.

To achieve the desired effect, you should instead use the
command

              %mydir := "%CURRDIR"

Now, the right hand side begins with a quote character so is
treated as a string literal and the current value of %CURRDIR
is substituted within it.

When a Variable name is used other than on the left hand side
of an assignment statement, it may be terminated with a . (full
stop) character if necessary to avoid confusion with the
characters which follow the name.

For instance, if the variable %VAR currently has the value
"BAT", then the command

                   MESSAGE "%VAR.S"

would display the message BATS whereas the command

MESSAGE "%VARS"

would display the contents of variable %vars.

If  a  string  must contain a percent sign then two percent
signs should be used.

e.g., 

           MESSAGE "50%"

would fail because it contains an incomplete variable name
whereas

           MESSAGE "50%%"

would display the string 50%

Variable names may appear almost anywhere within the parameters
of any Scripta command. Before a command is executed, all
occurrences of variable names are replaced by their current
value, converted to string form if necessary.
