gprolog and the 'listing' command

View: New views
2 Messages — Rating Filter:   Alert me  

gprolog and the 'listing' command

by Antonio Maschio :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all (and especially Daniel),

is it just possible to incorporate, in next versions of gprolog, the
'listing' behavior for output in the **current** stream, and not
**always** to standard output?

I mean: following the interesting exercises of the "Prolog Programming
in Depth" book by M. Covington et al., there's an exercise
("learner.pl") which makes use of the fact that opening an output file
stream, typing 'listing(pred_whatever/n)' and closing the stream, in the
file there's a complete database of facts for 'pred_whatever' that can
be read successively. through an input stream.

yap and swipl work this way; gprolog, instead, **always** prints the
output to screen.

I know this is not covered in ISO Prolog (at least, AFAIK), but it's
common practice in others, so I guess gprolog should conform to it (or
at least, enable this through some switch).

What's your thought, Daniel?

-- Antonio



_______________________________________________
Users-prolog mailing list
Users-prolog@...
http://lists.gnu.org/mailman/listinfo/users-prolog

Re: gprolog and the 'listing' command

by Daniel Diaz-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Antonio,


Antonio Maschio wrote:
> Hi all (and especially Daniel),
>
> is it just possible to incorporate, in next versions of gprolog, the
> 'listing' behavior for output in the **current** stream, and not
> **always** to standard output?
Yes I'll do it since many people ask for this.
In gprolog 1.3.2 listing will work on current output stream.
I should be available very soon.

Daniel



--
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.



_______________________________________________
Users-prolog mailing list
Users-prolog@...
http://lists.gnu.org/mailman/listinfo/users-prolog