[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: doco ports verbiage
From: |
Marius Vollmer |
Subject: |
Re: doco ports verbiage |
Date: |
12 Jun 2003 16:02:28 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Kevin Ryde <address@hidden> writes:
> For input, FILENAME must exist. For output, if FILENAME already
> exists the behaviour is unspecified.
What does Guile do when FILENAME already exists? We should document
that. We can defer to "what the OS usually does when opening an
existing file for writing." or more specifically "equivalent to
fopen(FILENAME, "w")".
> - Scheme Procedure: with-input-from-file filename thunk
> - Scheme Procedure: with-output-to-file filename thunk
> - Scheme Procedure: with-error-to-file filename thunk
>
> ...
>
> When THUNK returns, the port is closed and the previous setting of
> the respective current port is restored. If THUNK does not return
> (eg. if it throws an error), then what happens to the ports is
> unspecified.
I think we need to add that the respective current port is restored.
The new port might not be closed, but the old port is restored as the
current port.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405