[plt-scheme] read, read-line

From: Chongkai Zhu (u0476504 at utah.edu)
Date: Fri Jan 13 13:01:51 EST 2006

I have a program that occasionally needs user input. It 
use (read) to get a S-exp and (read-line) to get a string.
In v20x, all things work fine.

Now I shift to v30x. After a (read), normally a #\newline 
will be left on the input-port. So the next (read-line) 
will get a null string. I can solve by (peek-char) and 
then (read-char) if it is #\newline. But will it be more 
reasonable if PLT change the (read) to do this auto-
matically?

Sincerely,  
Chongkai Zhu



Posted on the users mailing list.