writes a term to a stream in a form defined by the given option-list.
write_term (+Term, +OptionList)
write_term (+Stream, +Term, +OptionList)
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.
Arguments
Stream |
text output stream |
Term |
term |
OptionList |
term (quoted(+Bool), ignore_ops(+Bool), numbervars(+Bool), variable_names(+VarList)).
|
Examples
?- 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)
Standard
These predicates are part of the ISO-Prolog Standard.
See also
current_op/3,
op/3,
print/1/2,
println/1/2,
read/1/2,
read_term/2/3,
write/1/2,
write_canonical/1/2,
writeq/2.
|