From ... Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.tele.dk!148.122.208.68!news2.oke.nextra.no!nextra.com!news01.chello.no!Norway.EU.net!127.0.0.1!nobody From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: struggling with READ-CHAR and LOOP (accumulating digits) Date: 30 Oct 2000 09:04:20 +0000 Organization: Naggum Software; vox: +47 800 35477; gsm: +47 93 256 360; fax: +47 93 270 868; http://naggum.no; http://naggum.net Lines: 17 Message-ID: <3181885460303559@naggum.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: oslo-nntp.eunet.no 972900906 7337 195.0.192.66 (30 Oct 2000 10:15:06 GMT) X-Complaints-To: newsmaster@eunet.no NNTP-Posting-Date: 30 Oct 2000 10:15:06 GMT mail-copies-to: never User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 Xref: supernews.google.com comp.lang.lisp:2873 * Kent M Pitman | (defun whitespace-p (char) | (or (eql char #\Space) (not (graphic-char-p char)))) | | (defun gobble-whitespace (&optional (stream *standard-input*)) | (loop for c = (read-char stream nil nil) | until (or (not c) ;eof | (not (whitespace-p c))))) I use (peek-char t ) for this. Several older Lispers have been surprised that this functionality is in there, but it has been since CLtL1. #:Erik -- Does anyone remember where I parked Air Force One? -- George W. Bush