[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using prolog stream in c / big data input
From: |
Hector Luis Palacios V.,Computacion |
Subject: |
Re: using prolog stream in c / big data input |
Date: |
Sun, 6 Jan 2002 20:27:51 -0400 (VET) |
I think it could be ready just with a cut (!).
Thats my modified version of the code
> % S is the stream and [A|B] the codes list
> read(S,[A|B]) :-
> \+ at_end_of_stream,
> get_code(S, A),
> A \= -1, A \= 4, !,
> read(S, B).
> read(_, []).
look at the "!" after A \= 4.
That's it.
Cheers.
Hector.