TACL Reference Manual
Variables
HP NonStop TACL Reference Manual—429513-018
4-29
Declaring a Directory Variable
Directory variables allow you to keep your variables grouped together in a segment file,
for your use or for sharing with other users. Segment files are explained in Section 5,
Statements and Programs.
Declaring a Directory Variable
To create a directory, use #DEF or ?SECTION (in a library) and specify the variable
type as DIRECTORY. You can also create directories by creating variables. For
example:
PUSH :a:b:c:d
creates these directories, if they do not already exist:
:a
:a:b
:a:b:c
You cannot, however, create a root (:) directory; do not issue a PUSH : command.
Accessing a Directory Variable
To refer to a specific variable in a directory, you name, in order, all the directories on
the direct path from the root to the specific variable. Start the name with a colon at the
beginning (which identifies the root directory) and place a colon after each directory
name. The name cannot contain spaces. Such a name is called a full path name. For
example, the full path name for the RUN command, which is a TACL variable stored in
the TACL directory variable in the UTILS directory variable, is :UTILS:TACL:RUN.
As an alternative, you can use a partial path name. A partial path name does not begin
with a colon, and it contains only as much of the full path name as is necessary to
properly identify the variable. On encountering a partial path name, TACL does one of
the following:
•
If the partial path name is being supplied to #DEF, #PUSH, PUSH, or ?SECTION
(in a library), TACL behaves as though the partial path name were preceded by the
directory named in the most recent HOME command. For example,
HOME :a:b
PUSH c
is equivalent to
PUSH :a:b:c
If the partial path name is being supplied to any other command, TACL acts as though
the partial path name were preceded by the directory named in the most recent HOME