[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- To: (BUG LISP) at MIT-MC
- From: RWK at MIT-MC (Robert W. Kerns)
- Date: Sun, 6 Aug 78 02:05:00 GMT
- Cc: NIL at MIT-MC
- Original-date: 5 AUG 1978 2205-EDT
All right, what's going on here. In MACLISP, the function IN only takes
one argument, so there is no way to specify an EOF value. Also, the
IO-LOSSAGE interrupt appears to be broken. While it is totally undocumented,
(LISP ARCHIVE mutters about it not being new in NEWIO, but the old LISP manual
is totally silent on the issue), one would expect that
(SETQ IO-LOSSAGE '(LAMBDA (X) '(NIL)))
would cause (IN FOO) to return NIL on EOF. It does not. It returns
-1 times the last value returned. It would seem that the only way to handle
EOF on a fixnum file is
(SETQ IO-LOSSAGE '(LAMBDA (X) (COND ((EQ CAR X) 'IN) (THROW (CADR X) 'IN-EOF)))
or the sledgehammer of an ERRSET.
I'm not sure what the best way to handle EOF is, but I hope NIL can do better
than this!! I also hope that MACLISP will be retrofitted with whatever
fix is decided on for NIL. How could this deficiency have lasted this long,
is there something obvious I'm missing?