read a term "Term" from a binary term stream "TermStream"
read a term from a binary term stream. At end of file, the predicate returns 'end_of_file'.
TermStream Stream, opened with open/4 option type(term) the data must be binary term data Term a term
open('mydata.data',read,TermStream,[type(term)]),
repeat,
read_binary_term(TermStream, Term),
( Term = end_of_file ->
true
; doSomeThingWith(Term),
fail
), !,
close(TermStream),
This predicate is not part of the ISO-Prolog Standard.