Opened 9 years ago

Closed 7 years ago

#998 closed defect (worksforme)

weird behavior of (read-line)

Reported by: hyh1048576 Owned by:
Priority: normal Milestone:
Component: IDE Version: 1.8
Keywords: Cc:

Description (last modified by rme)

e.g. when I do the following loop, it only read two lines. (Lispworks and CLisp read 3 lines)

(loop for i from 1 to 3 do (read-line))
1 2
2 3
and the following code only reports error in Clozure (in CLisp and Lispworks it is fine):
? (defun take-input(n)
(let ((s ()))
  (dotimes (i n)
     (with-input-from-string (s (read-line)) (loop for x = (read s nil :end) until (eq x :end) collect x)) s))
? (take-input 1)
1 2
> Error: Reader error on #<STRING-INPUT-STREAM  #x302006AA204D>, near position 1, within ")":
>        Unmatched ')' .

Change History (2)

comment:1 Changed 7 years ago by rme

  • Description modified (diff)

comment:2 Changed 7 years ago by rme

  • Resolution set to worksforme
  • Status changed from new to closed

This works now in current CCL.

Note: See TracTickets for help on using tickets.