TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-291
#PREFIX Built-In Variable
#PREFIX Built-In Variable
Use #PREFIX to set or obtain the current contents of the prompt prefix string.
Result
#PREFIX returns the current contents of the prompt prefix string.
Considerations
When you first log on, #PREFIX is initialized to a null value.
Use #PUSH #PREFIX (or PUSH #PREFIX) to save a copy of the current contents
of the prefix string.
Use #POP #PREFIX (or POP #PREFIX) to restore the prefix string from the last
copy pushed.
Use #SET #PREFIX (or SET VARIABLE #PREFIX) to define text to be output by
TACL at the beginning of any prompt (except for those output by #INPUT) if
#PROMPT is not zero. (See #PROMPT Built-In Variable on page 9-314 for a way
to recompute #PREFIX each time it is used as a prompt.)
The syntax of #SET #PREFIX is:
text
is a prefix of up to 40 characters. If you omit text, there is no prefix.
Example
1. This example illustrates the use of #PREFIX to output the current prompt prefix:
MINE 20> #OUTPUT [#PREFIX]
MINE
MINE 21>
2. This example shows the relationship between _PROMPTER, #PREFIX, and
#PROMPT:
63> [#DEF _prompter MACRO |BODY| == Define a macro
63> #SET #PREFIX Number
63> ]
64> #SET #PROMPT -1 == Enable the custom prompt
Number 65>
#PREFIX
#SET #PREFIX [ text ]