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

From: Volkan Unsal <spocksplanet_at_gmail.com>
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 : Fri Jul 26 2013 - 06:15:06 CEST