[racket] Fwd: Input Issues

From: Bill Hager (whager+plt at gmail.com)
Date: Mon Jan 10 20:36:52 EST 2011

Hi All.

I'm having an issue with (read-line).  Below is some output from running the
attached rkt file on my system(Ubuntu 10.10, Racket 5.0.2).  In the first
instance the script runs, and as I expect I can enter a string such as
"Hello". When I use the repl it does not work like I expect it to, and I
don't get a chance to enter a string.  Any ideas?  I thought about
flushing/discarding data from the input port before calling (read-line), but
I only found a function for flushing an output port.

Thanks!

bash$ racket -l scheme -t "read-test.rkt" -e "(read-input)"
Enter a string: Hello
"Hello"
bash$ racket
Welcome to Racket v5.0.2.
> (require "read-test.rkt")
> (read-input)
Enter a string: ""
>

- Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110110/d96a96b5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read-test.rkt
Type: application/octet-stream
Size: 108 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20110110/d96a96b5/attachment.obj>

Posted on the users mailing list.