From Pieter.Audenaert@rug.ac.be Wed Apr 18 11:39:05 2001
Received: from dobit2.rug.ac.be (dobit2.rug.ac.be [157.193.42.8])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f3I9d5329390
	for <prolog@swi.psy.uva.nl>; Wed, 18 Apr 2001 11:39:05 +0200 (MET DST)
Received: from allserv.rug.ac.be (allserv.rug.ac.be [157.193.40.42])
	by dobit2.rug.ac.be (8.11.1/8.11.1) with ESMTP id f3I9cxk05287
	for <prolog@swi.psy.uva.nl>; Wed, 18 Apr 2001 11:38:59 +0200 (MEST)
Received: from localhost (paudenae@localhost)
	by allserv.rug.ac.be (8.11.1/8.11.1) with ESMTP id f3I9cx005671
	for <prolog@swi.psy.uva.nl>; Wed, 18 Apr 2001 11:38:59 +0200 (MEST)
Date: Wed, 18 Apr 2001 11:38:59 +0200 (MEST)
From: Pieter Audenaert <Pieter.Audenaert@rug.ac.be>
To: <prolog@swi.psy.uva.nl>
Message-ID: <Pine.GSO.4.31.0104181128460.6459-100000@allserv.rug.ac.be>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [SWIPL] Open stream

Hi,

Suppose I have a predicate like

foo:-
  open('bar','write',Out_Stream),
  write(Out_Stream,'foobar'),
  fail.

The file will be opened and the term will be written. But I lose my
reference to the stream to close it. Will it get closed automatically?
I don't like the idea of leaving an open stream behind...

Thanks in advance,
Pieter
----------------------------------
University of Gent, Belgium
Dept. of Pure Mathematics
http://allserv.rug.ac.be/~paudenae
pieter.audenaert@rug.ac.be
----------------------------------

