Tabard: Multiple GNU Prolog Engines in a Distributed Environment

October 10, 2006

Howto: Transform a string into a Prolog term

Filed under: Howto — tabard @ 3:56 pm

You can use read_term_from_codes/3 but remember to pass the option end_of_term(eof) if the term doesn’t end with a dot. This is because the default end-of-term delimiter is dot.

Example:
read_term_from_codes(”a(a)”, X, [end_of_term(eof)])

X = a(a)

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.

Blog at WordPress.com.