reading lines from stream
Posted: Tue Jun 07, 2005 10:10 pm
just to clarify, a stream could be anything, all we can about is capturing on STDIN
Anyway, I have this code:
(do-until (= n "QUIT")
(set 'n (read-line))
(print n)
)
Basically everytime I read a line (termianted by CLRF), I want to be able to do something to what I just got (in this case, print it). I think this is a blocking issue, so is there a way to tell newlisp, globally, to do non-blocking on all IO operations?
Thanks.
Anyway, I have this code:
(do-until (= n "QUIT")
(set 'n (read-line))
(print n)
)
Basically everytime I read a line (termianted by CLRF), I want to be able to do something to what I just got (in this case, print it). I think this is a blocking issue, so is there a way to tell newlisp, globally, to do non-blocking on all IO operations?
Thanks.