WriteTerm2
Implements ISO's write_term/2: formats the first argument according to the options listed in the second (quoted(Bool), ignore_ops(Bool), numbervars(Bool), each defaulting to false, see IOPrimitiveUtils.ensuringArgumentIsFormatter) and writes it to the current output stream (see IOPrimitiveUtils.currentOutputChannel).
?- write_term(foo(X, 'a b'), [quoted(true)]).Content copied to clipboard
Throws
if the options argument is unbound.
if it is bound but not a list.
(write_option) if an element of the list is not one of the recognized option shapes.
Fails, rather than erroring, if the channel is closed.