Re: [racket-users] with-input-from-file question

2018-12-16 Thread Jonathan Simpson
Ah, thanks! On Sunday, December 16, 2018 at 3:53:06 PM UTC-5, Jon Zeppieri wrote: > > > On Sun, Dec 16, 2018 at 2:59 PM Jonathan Simpson > wrote: > >> What is the difference between this code, which reads and returns "#lang" >> from the file: >> (define in-file (open-input-file "adventure.rkt"))

Re: [racket-users] with-input-from-file question

2018-12-16 Thread Jon Zeppieri
On Sun, Dec 16, 2018 at 2:59 PM Jonathan Simpson wrote: > 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

[racket-users] with-input-from-file question

2018-12-16 Thread Jonathan Simpson
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" (r