From: SRS
Subject: Re: set-macro-character
Date: 
Message-ID: <92fabv$4ie$1@nnrp1.deja.com>
In article <·················@eurocom.od.ua>,
  "Vladimir V. Zolotych" <······@eurocom.od.ua> wrote:
>   Hello
> Could anybody explain me why additional keypress needed ?
> E.g. I need to press<Enter> twice to see the result.
> I'm using CMUCL.
>
> *(set-macro-character #\$ #'(lambda (stream char)  (declare (ignore
> char)) (round (* 100 (read stream)))))
> T
> * $9.95<Enter>
> <Enter> - this <Enter> needed and I suppose it excessive
> 995
> *

Try

(set-macro-character #\$
    (lambda (stream char)
        (declare (ignore char))
        (round (* 100 (read stream t nil t)))))

-- SRS


Sent via Deja.com
http://www.deja.com/