Re: Using I/O in ECLiPSe

From: Joachim Schimpf <>
Date: Thu 04 Jul 2002 08:44:58 PM GMT
Message-ID: <>
Karen E Petrie wrote:
> What I am trying to do is very simple in theory. Baisically I am testing a
> problem so I have added some write statements to the problem so I can tell what
> is going on with certain variables as the program progresses (incidentally is
> there a way to just spy on certain variables using the debugger ?)

Yes, there is some debugger support for this:

If you are using the command-line version of Eclipse, check out the
debugger's v-command (var/term modification skip).

If you are using tkeclipse, you should have a look at the "display matrix"
facilities, and the related "observe term" options in the tracer.

Finally, if you have already upgraded to Eclipse 5.4, you can try the
new Visualisation Tools (see separate manual).

> I want to send this output to a file so I can analyse it. I have set this up by
> adding:
> :- open("TestOutput", write, new_stream).
> :- set_stream(output, new_stream).
> at the top of the file. To send the output to a file called 'TestOutput'.
> and then closing this file by adding the lines:
> flush(new_stream),
> close(new_stream).

The library lib(fromonto) makes this more convenient. You just write

  ?- my_goal(...) onto_file "my_log_file".

and the output from my_goal(...) will be written to the file.

 Joachim Schimpf              /             phone: +44 20 7594 8187
 IC-Parc, Imperial College   /  
 London SW7 2AZ, UK         /
Received on Thu Jul 04 21:47:11 2002

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:15 PM GMT GMT