4.20 Term reading and writing
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Term reading and writing
          • write_term/2
          • write_term/3
          • write_length/3
          • write_canonical/1
          • write_canonical/2
          • write/1
          • write/2
          • writeq/1
          • writeq/2
          • writeln/1
          • writeln/2
          • print/1
          • print/2
          • portray/1
          • read/1
          • read/2
          • read_clause/3
          • read_term/2
          • read_term/3
          • read_term_from_atom/3
          • read_term_with_history/2
          • prompt/2
          • prompt1/1
    • Packages
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.