TACL Reference Manual
HP NonStop TACL Reference Manual—429513-018
5-1
5 Statements and Programs
A TACL program consists of one or more statements. A TACL statement consists of
one of these:
•
A function call
•
A directive
This section describes the syntax for TACL statements and directives, and then
discusses how to create TACL programs, handle completion codes, and process
errors.
For additional examples of TACL programs, see the TACL Programming Guide.
Function Calls
This subsection describes each of these types of statements, and includes a list of
arguments that are common to built-in TACL functions.
A function call has this syntax:
function-call [ argument [ argument ... ] ] [ enclosure ]
[ comment]
function-call
is the name of a TACL command or built-in function, or a user-defined TACL program.
The syntax for each command is listed in Section 8, UTILS:TACL Commands and
Functions. The syntax for each built-in function is listed in Section 9, Built-In Functions
and Variables.
You must enclose the function call in square brackets if:
•
You want to use the expansion of the function call for further processing.
•
The function call includes an enclosure.
•
The function call spans more than one line.
•
The function call requires brackets to process an argument that references a
multiple-line variable. (Some function calls, such as #OUTPUT, expand their
arguments and use only the first line unless you surround the function call with
square brackets. TACL then tries to execute the second and following lines of the
expanded variable.)
If none of the foregoing are true, the function call need not be enclosed in brackets.
argument
is text, a string, a function name, or other construct as defined by the function call.
If you supply a function name as an argument, the name must be enclosed in
square brackets. For definitions of text and strings, see Section 2, Lexical
Elements.