TACL Reference Manual
Statements and Programs
HP NonStop TACL Reference Manual—429513-018
5-11
How TACL Interprets Statements
If you try to purge TEMP a second time, TACL returns an error message:
19> PRG TEMP
Error 11
20>
An error 11 indicates that the file was not found:
20> Error 11
011 file not in directory or record not in file, or the
specified tape file is not present on a labeled tape
How TACL Interprets Statements
TACL requires read access to interpret a TACL program. TACL uses a 32,767-byte
text buffer to execute statements. TACL executes statements in this sequence:
1. If the text buffer is empty, TACL prompts and waits for input. The input is placed
into the TACL text buffer, the place where function execution actually takes place.
The text buffer may contain from zero to many lines of text. If the text buffer is not
empty, TACL examines the contents of the buffer, starting with the first line and
moving forward through the buffer.
2. TACL examines the current line of the text buffer from its beginning, searching for
square brackets.
If TACL encounters square brackets, TACL invokes the first element in that line
whose closing bracket is found, ignoring any function calls that are inside
enclosures. For macro variables, TACL substitutes dummy arguments as
necessary. TACL replaces the element with its result (if it was a built-in function or
other routine) or its expansion, starts again at the beginning of the line, and
repeats the process.
If the current line of the text buffer does not contain any square brackets, TACL
executes the entire line as though the entire line had been surrounded by a pair of
square brackets. TACL replaces the function call or line of text with the result of
the function. The result can be empty, can contain part of a line of text, or can
contain many lines of text.
3. TACL returns to Step 1.
As you can see from Step 2, TACL does not execute function calls within enclosures.
Enclosures usually contain TACL statements; functions typically expand enclosures
and return unexecuted TACL statements. When TACL returns to Step 1, the code is
available for execution. Enclosures are used with a functions that control program flow
or define variables; they are not used with any commands.
During execution, the space available in the text buffer diminishes as routines and
macros are nested. Also, TACL might need up to half of the available area of the text
buffer as a scratch area.
If your code exceeds the size of the text buffer, TACL returns a “Text buffer overflow”
error. Common causes are: