[eclipse-clp-users] Beginner question: how do I read from an open stream?

From: Volkan Unsal <spocksplanet_at_...6...>
Date: Thu, 25 Jul 2013 13:25:16 -0400
I have a SWI Prolog function that is not working in Eclipse, and I can't
find documentation for reading the contents of a file. Here is my current
approach (that is not working):

read_until_stop(File, [L|Lines]) :-
    read_line_to_codes(File, Codes),
    Codes \= end_of_file,
    atom_codes(L, Codes),
    L \= stop,
    read_until_stop(File, Lines).
read_until_stop(_, []).
Received on Thu Jul 25 2013 - 17:25:54 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:30 CEST