streams
Cliff Bender <[email protected]>
| Newsgroups | gmane.comp.gnu.prolog.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'd like some help trying to understand the use of streams. As I understand,
this should produce a file 'out.txt', with the listing in it. However, the
listing gets printed to the screen, and the file is empty:
| ?- open('out.txt', write, H, [alias(out)]), current_output(COUT),
set_output(out), listing, set_output(COUT).
squint([], []).
squint([A|B], [C|D]) :-
integer(A),
C is A * A,
squint(B, D).
squint([A|B], [A|C]) :-
squint(B, C).
COUT = '$stream'(1)
H = '$stream'(2)
(1 ms) yes
| ?-
If anyone has any ideas, suggestions, anything, please reply.
Thanks and have a great weekend.
Cliff
_______________________________________________
Users-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/users-prolog