Path: utzoo!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!nosc!ucsd!nprdc!stanonik From: stanonik@nprdc.arpa (Ron Stanonik) Newsgroups: comp.lang.lisp Subject: unread'ing Message-ID: <1302@arctic.nprdc.arpa> Date: 10 Jan 89 16:24:27 GMT Sender: news@nprdc.arpa Reply-To: stanonik@nprdc.arpa (Ron Stanonik) Organization: Navy Personnel R&D Center, San Diego Lines: 28 We've just started using Sun Common Lisp 2.1.1 (Lucid really?) on a Sun 3 running SunOS 3.5, so sorry if this has come up before. A program developed under this lisp, failed to work on a Symbolics 3670 running Genera 7.2. The problem seems to be that the program does something like (setq c (read-char)) (if (eql (peek-char) #\space) (unread-char c)) That is, if the peek-char is a space, the program unread's the previous char. Genera complains correctly (as I read CLtL, 1984) about trying to unread two characters in a row; ie, the peek-char is equivalent to read-char followed by an unread-char. Sun Common Lisp unread's two (maybe more?) characters without complaint, which allowed the program to work even though it violated the Common Lisp spec. KCL also allows two (maybe more?) unread's in a row. Ron Stanonik stanonik@nprdc.arpa ucsd!nprdc!stanonik