Re: tell and listing

Yury Luneff <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Organization ТТИ ЮФУ
Message-ID <1178016287.30213.1.camel@yury-laptop>
В Пнд, 30/04/2007 в 10:32 -0700, markmuetz пишет:
> Hi,
> 
> I'm trying to load a prolog file (using ['file.pl'].), modify it and then
> save the changes (e.g to 'file2.pl'). To do this I'm calling 
> ?- ['file.pl'].
> ?- retract(node(node1,_,_)).
> ?- tell('file2.pl'). 
> ?- listing.
> I was expecting the output of listing to go to the file, but instead it goes
> to the terminal. I tried playing around with the open/3 predicate but to no
> avail. How do I go about doing this properly (i.e. get listing to go to a
> file and not to the terminal)?
> 
> Thanks in advance,
> Mark
AFAIK you should write everything you want to be a program as a single
line, w/o pressing enter after each statement. In addition it is
recommended to say 'told' after you've written the file.
-- 
Лунёв Юрий
ТТИ ЮФУ, 2007
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.