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