This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home. For a version of this page that may be more recent, see CwifClosePort in WG2's repo for R7RS-large.


2012-10-05 01:06:31
2Updated for Scheme 9history

I created a file named "three" whose content was "3", and ran the following code in the test Schemes:

(define port #f) (call-with-input-file "three" (lambda (p) (set! port p) (+ 'a 'b))) ; signals an exception (read port)

to see if the final (read port) would return 3 (meaning that the port was still open after the exception was raised) or would fail with a new exception, something like "closed port".

Printed 3: Racket, MIT, Chicken, Scheme48/scsh, Guile, Chibi, SCM, Chez, Vicare, Larceny, Ypsilon, Mosh, STklos, KSi, SigScheme, TinyScheme, Dream, RScheme, XLisp, Elk, VX, SXM, Spark, Inlab, Scheme 9

Failed with closed-port exception: Gauche, Bigloo, Kawa, SISC, IronScheme, NexJ, Scheme 7, BDC, Sizzle

Failed for other reasons (typically because call-with-input-file is not supported): Shoe, Rep, Schemik, UMB, Oaklisp, Llava, Femtolisp, Dfsch, Owl Lisp