|
Define placeholders for character strings that can also be used
as traditional program variables.
Set a variable in the global name space:
globset <variable>=<value>
globset <associative-variable>=<value>
Set a new variable in the current name space, or change value to a
previously set variable:
set <variable>=<value>
set <associative-variable>=<value>
Unset a variable:
unset <variable>
unset <associative-variable>
Access contents of a variable within an input line (both text and command line):
text text text text text text text text
text text text <variable> text text text
text text text text text text text text
A <variable> is defined as an identifier represented by a sequence of
letters, digits and underscore ('_'). The first character of the
identifier must be either a letter or an underscore.
Tefigel is case-sensitive with respect to variable identifiers.
A <value> can be any string and requires no delimiters: every character
after the assignment operator = up to the end of the logical
command line is considered part of the <value> to be stored in the
<variable>, including blanks and tabs, which are treated exactly as
all other characters. A <value> may contain other variables as well as
in-line function calls, so that <variable> is assigned the string
of characters resulting from replacing the other variables with their contents,
and the in-line function calls with their return values.
An <associative-variable> is defined as the concatenation of
two or more identifiers by means of the current dash
special character. The identifiers may refer to previously set variables -
in which case their current value is used to construct the corresponding
part of the identifier of the <associative-variable> - or not refer
to any variable - in which case they will literally be
used to construct the corresponding part of the identifier of the
<associative-variable>.
Depending on its current value, a variable may be used for arithmetic
or boolean computation, as explained later in this guide.
[Previous chapter]
[Next chapter]
[Back to top]
|