ReadTerm2

Implements ISO's read_term/2: like Read1, but the second argument is a list of options requesting term metadata back (variables(Vars), variable_names(Pairs), singletons(Pairs)); if the list is unbound instead, a [Vars, Pairs, Singletons] list is unified with it, reporting all three at once. See IOPrimitiveUtils.readTermAndReply for the shared implementation.

?- read_term(Term, [variable_names(Names)]).

Throws

if the options argument is bound but not a list.

(read_option) if an element of the options list is not one of the recognized shapes.

if the stream's next term is malformed Prolog syntax.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard