[gambit-list] Easy Console Input

Christian Jaeger christian at pflanze.mine.nu
Wed Nov 21 16:51:10 EST 2007


Rouan van Dalen wrote:
> Hi everyone.
>
> I was wondering what the easiest way in Gambit is to read a string 
> from the
> console.
>
> The idea is to prompt the user for a message and let him type in a 
> string response.
cat <<'END' > consinpexample.scm
(define (rl)
(read-line (console-port)))

(print "Give name please: ")
(let ((name (rl)))
(println "Hello, " name))
END
gsi consinpexample.scm

Christian.





More information about the Gambit-list mailing list