TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-87
#DEF Built-In Function
#DEF Built-In Function
Use #DEF to define a variable.
variable
is the name of the variable. If the variable exists, TACL pushes it, creating a new
top level. If the variable does not exist, TACL creates it.
ALIAS
specifies that variable is a command alias.
DELTA
specifies that variable is to contain #DELTA commands.
MACRO
specifies that variable is a TACL macro.
ROUTINE
specifies that variable is a TACL routine.
TEXT
specifies that variable is to contain plain text.
enclosure
has this form (any other labels and associated text are ignored):
|BODY| [ text ]
It defines the contents of the variable.
DIRECTORY [ segment-spec ]
specifies that variable is a directory. Use DIRECTORY to create a directory that can
contain a hierarchy of variables or to attach a segment. If you specify segment-spec,
TACL attaches the segment. If you omit segment-spec, TACL pushes the named
variable (in the segment in which it is defined) but does not associate it with a segment
file.
segment-spec
has the form { PRIVATE | SHARED } file-name
#DEF variable {
{ ALIAS | DELTA | MACRO | ROUTINE | TEXT} enclosure}
DIRECTORY [ segment-spec ]
STRUCT structure-body
}