From: J.L. Perez-de-la-Cruz
Subject: READ-LINE
Date: 
Message-ID: <37303039.4DEBED53@apolo.lcc.uma.es>
In the CLHS it can be read:
Function READ-LINE 
read-line &optional input-stream eof-error-p eof-value recursive-p
=> line, missing-newline-p
...
The secondary value, missing-newline-p, is a generalized boolean 
that is false if the line was terminated by a newline, or true 
if the line was terminated by the end of file for input-stream 
(or if the line IS the EOF-value) (my emphasis)

However, the following program loops forever in CLISP for Windows:
(DEFUN LEER-TEXTO ()
   (WITH-OPEN-FILE (F1 "kk.txt" :DIRECTION :INPUT)
      (LOOP
         (MULTIPLE-VALUE-BIND (LINEA FINAL)
            (READ-LINE F1 NIL)
           (TERPRI)
           (PRINC LINEA)
           (WHEN FINAL (RETURN))))))
(LEER-TEXTO)
when "kk.txt" contains the two lines
asdf
<EOF>
but behaves properly when "kk.txt" contains a space in the second line
asdf
 <EOF>
Is this a little bug in CLISP or am I misunderstanding the
specification?
Thanks.

---------------------
Jose-Luis Perez-de-la-Cruz
ETSI Informatica
POB 4114
MALAGA 29080 SPAIN
Tlf +34 952 132801
Fax +34 952 131396
--------------------

From: Erik Naggum
Subject: Re: READ-LINE
Date: 
Message-ID: <3134901101345002@naggum.no>
* "J.L. Perez-de-la-Cruz" <····@apolo.lcc.uma.es>
| Is this a little bug in CLISP or am I misunderstanding the
| specification?

  since you return whatever object CLISP elects to mean end-of-file when
  you hit the end of file, I suppose you get a lot of that object printed
  while READ-LINE continues to hit its head at the end of the file when the
  last line was properly terminated.

#:Erik
From: J.L. Perez-de-la-Cruz
Subject: Re: READ-LINE
Date: 
Message-ID: <37305C9F.DF264FA@apolo.lcc.uma.es>
Erik Naggum wrote:
> 
> * "J.L. Perez-de-la-Cruz" <····@apolo.lcc.uma.es>
> | Is this a little bug in CLISP or am I misunderstanding the
> | specification?
> 
>   since you return whatever object CLISP elects to mean end-of-file when
>   you hit the end of file, I suppose you get a lot of that object printed
>   while READ-LINE continues to hit its head at the end of the file when the
>   last line was properly terminated.

That's exactly what happens. 


---------------------
Jose-Luis Perez-de-la-Cruz
ETSI Informatica
POB 4114
MALAGA 29080 SPAIN
Tlf +34 952 132801
Fax +34 952 131396
--------------------
From: Erik Naggum
Subject: Re: READ-LINE
Date: 
Message-ID: <3134911730676487@naggum.no>
* "J.L. Perez-de-la-Cruz" <····@apolo.lcc.uma.es>
| That's exactly what happens. 

  then that's the expected and correct behavior.

  if you don't want this behavior, supply READ-LINE with a value that you
  can check against to see that you have hit the end of the file.  I tend
  to use the keywof :EOF when dealing with characters or strings.

#:Erik