• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
    • DSS Queries
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

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_history/6
          • prompt/2
          • prompt1/1
    • Packages
Availability:built-in
Sourceread_history(+Show, +Help, +Special, +Prompt, -Term, -Bindings)
Similar to read_term/2 using the option variable_names, but allows for history substitutions. read_history/6 is used by the top level to read the user's actions. Show is the command the user should type to show the saved events. Help is the command to get an overview of the capabilities. Special is a list of commands that are not saved in the history. Prompt is the first prompt given. Continuation prompts for more lines are determined by prompt/2. A %w in the prompt is substituted by the event number. See section 2.7 for available substitutions.

SWI-Prolog calls read_history/6 as follows:

read_history(h, '!h', [trace], '%w ?- ', Goal, Bindings)
ClioPatria (version V3.1.1-21-gb8003bb)