I'm using MIT Scheme 10.1.5 and am curious why the following code using open-i/o-file is not working as I expected. Does anyone know what the issue is?
(define l "~/tmp0") (define x ''(a b (c d) e f)) (let ((p (open-i/o-file l))) (begin (write x p) (flush-output p) (let ((r (read p))) (close-port p) r)));Value: #!eof when I was expecting: ;Value: (quote (a b (c d) e f)) When using open-input-file or open-output-file the results are expected: (let ((p (open-output-file l))) (write x p) (close-port p)) (let ((p (open-input-file l))) (let ((r (read p))) (close-port p) r));Value: (quote (a b (c d) e f))