unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <mvo@zagadka.de>
Subject: Re: doco ports verbiage
Date: 12 Jun 2003 16:02:28 +0200	[thread overview]
Message-ID: <87smqf8kcr.fsf@zagadka.ping.de> (raw)
In-Reply-To: <877k7sm7uq.fsf@zip.com.au>

Kevin Ryde <user42@zip.com.au> 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


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2003-06-12 14:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-12  0:56 doco ports verbiage Kevin Ryde
2003-06-12 14:02 ` Marius Vollmer [this message]
2003-06-14  0:02   ` Kevin Ryde
2003-06-14  0:32     ` Marius Vollmer
2003-06-15  0:32       ` Kevin Ryde
2003-06-18 23:39         ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87smqf8kcr.fsf@zagadka.ping.de \
    --to=mvo@zagadka.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).