TACL Reference Manual
HP NonStop TACL Reference Manual—429513-018
4-1
4 Variables
In many other languages, the term variable refers to a simple variable that contains a 
single element, such as the number 10, or a more complex variable that contains an 
set of elements. In TACL, a variable can contain a single element, a set of elements, or 
information as diverse as a hierarchy of variables or a series of TACL statements. 
You can create, set, and delete variables. You can access variables interactively or 
load them into memory from a file. For more information about loading variables, see 
Section 5, Statements and Programs.
This subsection provides general information about variables, including a discussion of 
the stack organization of variables. The remainder of this section provides information 
about each type of TACL variable.
Along with the variables you create, TACL supplies a set of variables. These variables 
are called built-in variables and are listed in Section 9, Built-In Functions and 
Variables.
An Overview of TACL Variables
A TACL variable can contain data, TACL statements, or other information. Table 4-1 
lists the seven types of variables. TEXT variables can be used to contain text or 
procedural constructs.
Table 4-1. TACL Variables and Their Uses (page 1 of 2)
Variable 
Type Description
TEXT  Contains text or a sequence of TACL statements. A text variable that 
contains text is most similar to simple variables used by other programming 
languages. A TEXT variable that contains TACL statements does not 
accept arguments, but can be used in a similar way as a MACRO variable 
(described below) if arguments are not necessary.
ALIAS  Contains the name of a TACL variable. An ALIAS variable allows you to 
invoke a variable by a different name: the alias name. Any arguments 
supplied when invoking an alias variable are passed to the referenced 
function.
MACRO Contains a sequence of TACL statements. Arguments presented to the 
macro are substituted, without interpretation or checking, for dummy 
arguments in the macro text; each argument is referenced by position.
ROUTINE  Contains a sequence of TACL statements. A routine can parse its own 
arguments (TACL supports several predefined argument types) and can 
compute its own result.










