writes a term to a stream in a form defined by the given option-list.
write_term/1 writes a single term (Term) to the current
outputstream in the form given by OptionList.
write/2 writes a single term (Term) to the given stream(Stream)
in the form given by OptionList.
| Stream | text output stream |
| Term | term |
| OptionList | term (quoted(+Bool), ignore_ops(+Bool), numbervars(+Bool), variable_names(+VarList)). |
?- write_term(hello / World + '$VAR'(2), []). hello / _1 + $VAR(2)?- write_term(hello / World + '$VAR'(2), [quoted(true)]). hello / _1 + $VAR(2)
?- write_term(hello / World + '$VAR'(2), [ignore_ops(true)]). +(/(hello,_1),$VAR(2))
?- write_term(hello / World + '$VAR'(2), [numbervars(true)]). hello / _1 + C
?- write_term(hello / World + '$VAR'(2), [variable_names(['Eric' = World])]). hello / Eric + $VAR(2)
These predicates are part of the ISO-Prolog Standard.