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
[ISO]write_canonical(+Term)
Write Term on the current output stream using standard parenthesised prefix notation (i.e., ignoring operator declarations). Atoms that need quotes are quoted. Terms written with this predicate can always be read back, regardless of current operator declarations. Equivalent to write_term/2 using the options ignore_ops, quoted, quote_non_ascii, brace_terms(false) and numbervars after numbervars/4 using the singletons option.

Note that due to the use of numbervars/4, non-ground terms must be written using a single write_canonical/1 call. This used to be the case anyhow, as garbage collection between multiple calls to one of the write predicates can change the _<NNN> identity of the variables.