TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-278
#OUTPUT Built-In Function
WORDS
causes text to be treated as a space-separated list of output items, applying
the FILL, JUSTIFY, and WIDTH options to each item. Without WORDS, text is
treated as a single output item.
text
is the output item. If you omit text, #OUTPUT writes a blank line.
Result
#OUTPUT returns nothing.
Considerations
This statement outputs the first line of vara and then executes any other lines,
unless vara is a routine:
#OUTPUT [vara]
If vara is a routine, TACL interprets the contents of vara and outputs its results.
Enclose the variable name in square brackets ( [#OUTPUT [vara]]) or use
#OUTPUTV (or OUTVAR) vara to output the contents of a multiple-line variable.
If text begins with a slash (/), you must supply an option to #OUTPUT so that the
slash at the beginning of text is not interpreted as the start of a list of options.
#OUTPUT accepts a text argument, which does not include end of line characters.
When you use the HOLD option, you can construct output lines in pieces. This
code displays “Alltogethernow”:
?TACL MACRO
#OUTPUT /HOLD/ All
#OUTPUT /HOLD/ together
#OUTPUT now
If, however, you want your output on separate lines, you can force separate lines by
specifying the COLUMN option; TACL starts a new line if there is output in the
specified column. This macro:
?TACL MACRO
#OUTPUT /COLUMN 5, HOLD/ This is the first line
#OUTPUT /COLUMN 5, HOLD/ This is the second line
#OUTPUT /COLUMN 5, HOLD/ This is the third line
#OUTPUT
#OUTPUT This is the last line
displays the following:
5> test
This is the first line
This is the second line