[r6rs-discuss] Typos
Michael Sperber
sperber at deinprogramm.de
Fri Apr 4 01:53:16 EDT 2008
Abdulaziz Ghuloum <aghuloum at cs.indiana.edu> writes:
> Section 1.13 and example D.2.2 both have incorrect programs using put-
> bytes, get-bytes-all, and not flushing the output port. The
> following can be used instead:
>
> (import (rnrs base) (rnrs io ports) (rnrs programs))
>
> (let ([p (standard-output-port)])
> (put-bytevector p
> (call-with-port
> (open-file-input-port
> (cadr (command-line)))
> get-bytevector-all))
> (flush-output-port p))
Thanks for the fixes---I'll make an erratum.
Now, I realize this isn't explicitly covered in the spec, but shouldn't
an implementation flush open ports upon exit? This is pretty widespread
practice both in Scheme and other languages, and at least the examples
seem to imply that this was the intention.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
More information about the r6rs-discuss
mailing list