TACL Reference Manual
Summary of Commands and Built-In Functions
HP NonStop TACL Reference Manual—429513-018
7-3
Built-In Variables
If you type a built-in function that produces a result and you do not enclose it in square
brackets, TACL automatically displays the result; for example:
56> #WIDTH
#WIDTH expanded to:
80
Built-In Variables
TACL built-in variables provide basic elements of TACL on which all other features,
including TACL commands, are based. Unlike TACL commands, which can be
customized or redefined, built-in variables are always available as described in this
manual.
Built-in variable names start with a number sign (#). You can push them (the PUSH
command and #PUSH built-in function create new top levels of variables), pop them
(the POP command and #POP built-in function delete the top level of a variable),
invoke them, and assign values to them, but you cannot delete them. There are certain
other restrictions on their use, explained in individual function and variable descriptions
in Section 9, Built-In Functions and Variables.
Examples of built-in variables include:
This example changes the TACL output file (stored in #OUT) to a spooler location to
receive the list of built-in functions, then restores the output file to its previous identity:
96> #PUSH #OUT
97> #SET #OUT $S.#LP
98> #BUILTINS /FUNCTIONS/
99> #POP #OUT
You can use #PUSH (or PUSH) to save a copy of the existing contents of the top
variable level and #POP (or POP) to restore the previous contents to the top of the
stack. #PUSH, however, does not create such a variable, because it already exists, nor
can #POP delete the variable entirely (you get a “was not pushed” error if you try to
pop the first level).
In addition, pushing a built-in variable copies the pushed contents to the new top level
(the built-in variable and the pushed level then have the same value). Also, many built-
in variables have default values or automatically stored values. Unlike your other
variables, which can be preserved from one TACL session to another, built-in variables
are popped completely and reset to their default values when you log off.
There are restrictions on the use of built-in variables; for example, a built-in variable
cannot be used as a variable in an #ARGUMENT function, nor can you specify an
explicit variable level (for example, #DEFAULTS.-2) for a built-in variable. The
#OUT The name of the OUT file used by TACL
#PMSG The state of the PMSG flag
#MYTERM The name of the home terminal