[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gprolog and the 'listing' command
From: |
Antonio Maschio |
Subject: |
gprolog and the 'listing' command |
Date: |
Mon, 12 Oct 2009 12:17:15 +0200 |
User-agent: |
Thunderbird 2.0.0.23 (Windows/20090812) |
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
- gprolog and the 'listing' command,
Antonio Maschio <=