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, _). +