Search                        Top                                  Index
HELP  POPPROMPT                                 Jonathan Laventhol, August 1984

The user-assignable variable POPPROMPT contains the prompt string which is
output when reading from a terminal (usually through the standard input
channel *POPDEVIN).  The default value of POPPROMPT is : .

The prompt must be either a string or a procedure.  If it is a string, it is
just printed when needed. If it is a procedure, then every time a prompt is
needed, the procedure is run and its result (which must be a string) is
printed.  This can be used for 'intelligent' prompting; try this:

    define popprompt();
        popclosebracket >< ' '

Note: Make sure that your procedure returns exactly one result, a string.  If
there are too many results they will be left on the stack, producing confusing
behaviour.  If there is no result, or it's not a string, then you'll get a
mishap, which will reset the prompt to : .

See also
HELP *CHARIN   - used when reading in from the terminal
REF  *SYSIO    - for more details on Input/Output procedures
HELP *READLINE - which also uses a prompt

--- C.all/help/popprompt
--- Copyright University of Sussex 1991. All rights reserved. ----------