gprolog and the 'listing' command

Antonio Maschio <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
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
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.