unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Subject: Re: closing string output ports?
Date: Sat, 06 Sep 2003 09:09:30 +1000	[thread overview]
Message-ID: <874qzqal3p.fsf@zip.com.au> (raw)
In-Reply-To: <8765kdy01n.fsf@tapsellferrier.co.uk> (nferrier@tapsellferrier.co.uk's message of "31 Aug 2003 22:44:36 +0100")

Nic <nferrier@tapsellferrier.co.uk> writes:
>
> (call-with-output-string
>    (lambda (prt)
>      (display "pah!" prt)
>      (close-port prt)))

Looks like a gremlin in call-with-output-string, it doesn't seem to
guard against its port having been closed.

Dunno what it ought to do in that case, maybe throw an error, maybe
return #f or unspecified.

> Should my soft port close-port impl call close-port on the underlying
> port?

It looks like one isn't meant to close a string port before getting
the result.  The manual doesn't seem to say anything about that
though.


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


  reply	other threads:[~2003-09-05 23:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-31 21:14 Server-side scripting Marius Vollmer
2003-08-31 21:44 ` closing string output ports? Nic
2003-09-05 23:09   ` Kevin Ryde [this message]
2003-09-07 19:14     ` Nic Ferrier
2003-09-07 19:16     ` Nic Ferrier
2003-10-07 14:53     ` Marius Vollmer
2003-10-07 19:54       ` Nic Ferrier
2003-10-08 13:30         ` Marius Vollmer
2003-10-08 21:19       ` Kevin Ryde

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=874qzqal3p.fsf@zip.com.au \
    --to=user42@zip.com.au \
    /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).