Availability:built-in
prompt(-Old,
+New)Set prompt associated with reading from the user_input
stream.
Old is first unified with the current prompt. On success the
prompt will be set to New (an atom). A prompt is printed if
data is read from user_input
, the cursor is at the left
margin and the user_input
is considered to be connected to
a terminal. See the tty(Bool)
property of stream_property/2
and set_stream/2.
The default prompt is '|: '
. Note that the toplevel loop
(see
prolog/0)
sets the prompt for the first prompt (see prompt1/1)
to
'?- '
, possibly decorated by the history event number,
break level and debug mode. If the first line does not complete
the term, subsequent lines are prompted for using the prompt as defined
by prompt/2.