I just saw the string Alexandre Moreira started a few days ago. No need to repeat anything from there. I guess it's just worth noting that he isn't the only one that wants to (read-line) from a function invoked on the REPL. My use case is similar to his. I have functions that take several arguments. It's easier on the human brain to ask for the data through a series of prompts instead of using a long function call. I'm also toying with the idea of using readline to add tab completion to some of my prompts. I haven't tried Readline, yet, though.<div>
<br><div>- Bill<br><br><div class="gmail_quote">On Mon, Jan 10, 2011 at 8:36 PM, Bill Hager <span dir="ltr"><<a href="mailto:whager%2Bplt@gmail.com">whager+plt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><div class="gmail_quote">Hi All.<div><br></div><div>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.</div>
<div><br></div><div>Thanks!</div><div><br></div><div><div><font face="'courier new', monospace">bash$ racket -l scheme -t "read-test.rkt" -e "(read-input)"</font></div>
<div><font face="'courier new', monospace">Enter a string: Hello</font></div><div><font face="'courier new', monospace">"Hello"</font></div><div>
<font face="'courier new', monospace">bash$ racket</font></div><div><font face="'courier new', monospace">Welcome to Racket v5.0.2.</font></div><div><font face="'courier new', monospace">> (require "read-test.rkt")</font></div>
<div><font face="'courier new', monospace">> (read-input)</font></div><div><font face="'courier new', monospace">Enter a string: ""</font></div>
<div><font face="'courier new', monospace">> </font></div></div><div><br></div><font color="#888888"><div>- Bill</div>
</font></div><br>
</div></div></blockquote></div><br></div></div>