From pmott@scs.leeds.ac.uk  Sun May 23 22:32:02 1999
Received: from csunb0.leeds.ac.uk (csunb0.leeds.ac.uk [129.11.144.2])
	by swi.swi.psy.uva.nl (8.9.3/8.9.3) with SMTP id WAA19408
	for <prolog@swi.psy.uva.nl>; Sun, 23 May 1999 22:32:01 +0200 (MET DST)
Received: from csund0.leeds.ac.uk (csund0.leeds.ac.uk [129.11.144.6]) by csunb0.leeds.ac.uk (8.6.12/8.6.12) with ESMTP id VAA19255 for <prolog@swi.psy.uva.nl>; Sun, 23 May 1999 21:29:06 +0100
Received: from cspcx40 by csund0.leeds.ac.uk; Sun, 23 May 1999 21:29:06 +0100
Message-Id: <3.0.2.32.19990523212245.00a92100@csun.leeds.ac.uk>
X-Sender: pmott@csun.leeds.ac.uk
X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.2 (32)
Date: Sun, 23 May 1999 21:22:45 +0100
To: "'prolog@swi.psy.uva.nl'" <prolog@swi.psy.uva.nl>
From: Peter Mott <pmott@scs.leeds.ac.uk>
Subject: Save the output of a prolog program in a file
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

There is another more 'standard' (ie procedural) way to do this. You do

open('myfile.txt', 'write', X),  print(X, 'Hello world'), close(X)

This lets you write whatever you like out to file. Reading it back in again
is maybe not
so easy as there is not anything like scanf or gets as far as I kow in SWI.
certainly not in Edinburgh prolog!

Peter 
==========================================================
Peter Mott				Tel: +44 (0)113 233 5323
School Of Computer Studies			Fax: +44 (0)113 233 5468
University of Leeds, Leeds LS2 9JT   		Office: +44 (0)113 233 5430

