[plt-scheme] curious input phenomenon
Chongkai Zhu wrote:
> The following code explains it better:
>
> (define (one-last-input)
> (local [(define in
> (begin0 (read-char)
> (print "\n")))
> (define (loop-forever)
> (loop-forever))]
> (loop-forever)))
>
> (one-last-input)
Once I do a read, the input window is always there. I thought it
disappeared and reappeared for the next read, but it doesn't. This code
makes that clear:
(read-char)
(sleep 10)
(printf "hi\n")
(read-char)
If I type "test" into the window, the #\t value appears, and the input
box hangs around. Ten seconds later, the "hi" appears, then the #\e, and
the input box disappears as the prompt reappears.
Mystery solved. Thanks. --PR