What is the difference between this code, which reads and returns "#lang" 
from the file:
(define in-file (open-input-file "adventure.rkt"))
(parameterize ([current-input-port in-file]) (read-string 5))

and this code which appears to still read from stdin:

(with-input-from-file "adventure.rkt" (read-string 5))

I thought with-input-from-file would set the current-input-port to the file 
in basically the same way as the first code segment.

I see this behavior from both DrRacket and Emacs racket-mode.

Thanks,
Jonathan

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to