From 82ecc61f6ddf4c9af4b8bcaec2a62afea47492cf Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 14 Jun 2011 09:00:25 +0100 Subject: [PATCH] missing read_from_chars/2 --- library/charsio.yap | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/library/charsio.yap b/library/charsio.yap index bc4490a3e..d99cc849c 100644 --- a/library/charsio.yap +++ b/library/charsio.yap @@ -100,3 +100,14 @@ with_stream(Stream, Goal) :- current_output(Stream), call(Goal). +%% read_from_chars(+Codes, -Term) is det. +% +% Read Codes into Term. +% +% @compat The SWI-Prolog version does not require Codes to end +% in a full-stop. + +read_from_chars("", end_of_file) :- !. +read_from_chars(List, Term) :- + atom_to_term(List, Term, _). +