[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LINMODE AND READLINE
- To: BEN at MIT-ML
- Subject: LINMODE AND READLINE
- From: "Guy L. Steele, Jr." <GLS at MIT-AI>
- Date: Thu, 21 Feb 80 12:54:00 GMT
- Cc: BUG-LISP at MIT-AI
- Original-date: 21 February 1980 07:54-EST
What you observe is indeed the case, but it is not clear
that this is a bug. Line mode says that input comes in complete
lines. However, S-expresions do not, and certainly after
the read-eval-print loop has read the expression (READLINE)
there is still a <cr> left there. Perhaps what you wanted was
(PROGN (CLEAR-INPUT) (READLINE))
FOOBAR
returning "FOOBAR". In any case, you do need something to
swallow any extra input lying around. (Again, consider
typing all on one line:
(SETQ X (READLINE)) (PRINT X)
Then X would get " (PRINT X)", and the PRINT would not be evaluated.)