scsh-users
[Top] [All Lists]

[0.4.1] Default record-reader bites next record

To: scsh-bugs@martigny.ai.mit.edu
Subject: [0.4.1] Default record-reader bites next record
From: Victor Zandy <zandy@cs.wisc.edu>
Date: Sun, 5 Nov 1995 01:14:22 -0600
Cc: zandy@sol20.cs.wisc.edu
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"

<Prev in Thread] Current Thread [Next in Thread>
  • [0.4.1] Default record-reader bites next record, Victor Zandy <=