IF Computer > MINERVA > Manual > Reference > Predicates > Term input/output > write_term/2/3

write_term/2/3

MINERVA
ifcomputer logo
f
Expert Services on the Web

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.

document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/term_io/write_term/print_en.html
published 2008/10/6 update 1997/6/22 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 start (AT) ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
Back> managed with ubiCMS