1GENERAL: variable - string variables similar to shell variables in Unix

Variable names:
A variable has a name which may consist of up to 20 upper- or lowercase 
letters, digits, or underscore characters "_".

Variable value:
The value of a variable is always a charcter string. The result of the
evaluation of an arithmetic expression (for example with the command 
"eval") is converted to a character string before assignment to a variable.

Inserting the value of a variable:
The value of a variable <variable> is denoted by either $<variable> or
%<variable>. As in Fortran-77 a substring of a variable value is denoted 
by <variable>(<first>:<last>) where <first> and <last> are integer 
expressions that denote the first and the last character of the substring.
Numerical values of variables may be formatted according to a given
FORTRAN-77 format by $variable(format). The k-th element (defined as a 
sequence of non-blank characters) of a variable is denoted by $<variable>(k),
where "k" is an non-negative integer expression. If a variable should be 
followed directly by a letter, a digit or an underscore, one can use the 
syntax {$<variable>} to separate it from the following text.

Examples: set x=4.6                              # set the variable x
          set y=2.0                              # set the variable y
          eval sum=x+y                           # evaluate an expression
          set t=a sum                            # set the variable t
          set x y sum t                          # list these 4 variables
          ... Variables:
              x   = 4.6
              y   = 2.0
              sum = 6.60000
              t   = a sum
          print "This is $t: $x + $y = $sum"     # use values
          This is a sum: 4.6 + 2.0 = 6.60000
          print "A second $t(3:5)!"              # use a substring
          A second sum!
          set t(3:)=program                      # substring assignment
          print "$t or {$t}me?"                  # use of { } braces
          a program or a programme?
          
Types of variables:
Global variables are visible in the whole program, as long as there is no
       local variable with the same name. All variables except command 
       line parameters (by default called "p1", "p2",...; "nparam") and those 
       that appear in a "var" statement are global. All system variables are 
       global variables.
Local  variables are declared in the var statement of a macro and are only
       visible within the macro where they are declared and within macros 
       that are called via the declaring macro (except when such a macro 
       declares another local variable with the same name). Also the 
       command line parameters "p1", "p2",... and the variable "nparam" (the 
       number of command line parameters) are local variables.
System variables are variables that are set and/or used by the program. 
       All system variables are global.
Read-only variables are system variables whose value must not be changed
       explicitly, for example with a set statement; these variables are
       exclusively set by the program itself.

See also: ask, character, do, eval, macro, parameter, show, set, var
