Hi,
I'm running scsh 0.4.1 under Linux 1.2.13 on a 486.
The default reader from record-reader consumes the first character
of the next record.
In /tmp/test I have these three lines:
avic
bvic
cvic
In scsh:
> (define r (record-reader))
> (define q (open-input-file "/tmp/test"))
> (r q)
"avic"
> (r q)
"vic"
> (r q)
"vic"
> (r q)
'#{End-of-file}
>
As I understand record-reader's documentation, the three calls to
r should have returned the three lines of /tmp/test.
Also,
> (close q)
#t
> (define q (open-input-file "/tmp/test"))
> (define r (record-reader "\n" #f 'concat))
> (r q)
"avicb"
> (r q)
"vicc"
> (r q)
Error: exception
(string-set! " " 0 '#{End-of-file})
1>
Thanks,
"vic"
|