From neumann@s-direktnet.de  Sun May 23 20:12:52 1999
Received: from mail.s-direktnet.de (dns.itm-research.de [194.173.30.135])
	by swi.swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id UAA17255
	for <prolog@swi.psy.uva.nl>; Sun, 23 May 1999 20:12:50 +0200 (MET DST)
Received: from georg (pf-net1-host-14.seitz.de [193.155.171.14])
	by mail.s-direktnet.de (8.9.1/8.9.1) with SMTP id UAA09417
	for <prolog@swi.psy.uva.nl>; Sun, 23 May 1999 20:10:21 +0200 (MET DST)
Message-ID: <001c01bea547$3ae99440$0200a8c0@georg>
From: "Michael Neumann" <neumann@s-direktnet.de>
To: <prolog@swi.psy.uva.nl>
References: <01BEA54F.02EC69C0@RAS2-p74.hfa.netvision.net.il>
Subject: Re: output file
Date: Sun, 23 May 1999 20:08:10 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211



> I want to save the output of a prolog program in a file, how do I do it?

tell(FILE)                opens a file (overwrites, creates)
told(FILE)              closes the file
append(FILE)         opens a file for appending

after calling tell(file) following rules are going to a file instead of
standard-input/output:

read(X)              reads from file into X
write(X)             writes X to file
get(Ascii)            reads the next character from the file into Ascii
put(Ascii)            writes the character Ascii in the file
nl                        new line
tab(N)                N spaces


I hope this helps!

Michael

