TACL Reference Manual
Built-In Functions and Variables
HP NonStop TACL Reference Manual—429513-018
9-209
#INPUT Built-In Function
If you omit the UNTIL option, pressing a function key or the RETURN key
terminates reading. prompt is one or more characters to be written to the
IN file as a prompt.
Consideration
TACL saves the primary IN file, set at startup time, as the default setting of the #IN
built-in variable. If you set #IN to another file, TACL stores the second file as the
current IN file. You can use the #INPUT built-in function to read from either file.
Result
#INPUT returns the line read from the input file.
Examples
This example illustrates the differences resulting from options in the reactions of
#INPUT to function keys. Each of these read operations is terminated by function key
12:
1. With no options, #INPUT provides no carriage return, so the output in this example
appears as a continuation of the input, though on the next line. Text supplied by
the function key is included with the input text:
24> #OUTPUT [#INPUT ?]
?this
thisK$%
2. Option processing provides a carriage return, so the output text appears at the
beginning of the next line. With the FUNCTIONKEY option, the identity of the
function key pressed is stored in the specified variable level:
25> #PUSH key
26> #OUTPUT [#INPUT /FUNCTIONKEY key/ ?] , [key]
?that
that , F12
3. With the UNTIL TACL option, the identity of the function key prefaces the input
text:
27> #OUTPUT [#INPUT /UNTIL TACL/ ?]
?the_other
F12 the_other
4. These statements use #INPUT to prompt a user, save the name of the function key
that terminated the input, and place the input into the history buffer:
29> #SET #OUTFORMAT PRETTY
30> #PUSH key text
31> #SET text [#INPUT / FUNCTIONKEY key, HISTORY ~_-->~_/]
32> --> this is a test == terminated with F12 key
33> OUTVAR key
F12