Bug with stream implementation

Daniel Savard <[email protected]>
Newsgroups gmane.comp.gnu.prolog.bugs
Organization CIDS Inc.
Message-ID <1131227250.9570.6.camel@localhost>
Seems there is a bug with the streams implementation. I am newbie to
both gnu-prolog and prolog, I am trying to save a knowledge base using
the following fragment of code. This code is working properly with
swi-prolog-lite, but not with gnu-prolog. Only the write statement
produce some output in the file.

consult('toto.pl').
open('bozo.pl',write,Fic),set_output(Fic),write(':-
dynamic(kb/2).'),nl,listing(kb),flush_output(Fic),close(Fic).

Assume the output file is bozo.pl and the knowledge base is kb and in
file toto.pl.

I tried as well this way with the same result, working fine with
swi-prolog-lite:

consult('toto.pl').
tell('bozo.pl'),write(':- dynamic(kb/2).'),nl,listing(kb),told.

I am running gnu-prolog 1.2.16 with Linux kernel 2.6.13.

TIA,

Daniel Savard

_______________________________________________
Bug-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-prolog
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBDbShxy2EnV5gZm7ERAm3EAJ9j9J4BBHSvWu6oXQOfr7lx1MWVGgCeJ0ws
H8kKbAmmuMhO4Oh6COoSjlg=
=h4JP
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.