Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

#D

7 views
Skip to first unread message

Erik Naggum

unread,
May 20, 1996, 3:00:00 AM5/20/96
to

Scheme has #D for decimal. I have found this useful. a simple way to
obtain this in CMUCL follows, but I wonder whether it will find its way
into the language, and also why it isn't if it was decided against.


(in-package :common-lisp)

(defun sharp-D (stream sub-char numarg)
(ignore-numarg sub-char numarg)
(sharp-r stream sub-char 10))

(set-dispatch-macro-character #\# #\D #'sharp-d)


Barry Margolin

unread,
May 22, 1996, 3:00:00 AM5/22/96
to

In article <30415815...@arcana.naggum.no>,

Erik Naggum <er...@naggum.no> wrote:
>Scheme has #D for decimal. I have found this useful. a simple way to
>obtain this in CMUCL follows, but I wonder whether it will find its way
>into the language, and also why it isn't if it was decided against.

I don't think anyone ever proposed it for Common Lisp. There's already two
ways to enter decimal data: prefixing with #10R or appending a decimal
point. And since decimal is required to be the default radix, it's rarely
necessary to specify it explicitly (MacLisp defaulted to octal, so the
decimal point was used frequently).
--
Barry Margolin
BBN PlaNET, Cambridge, MA
bar...@bbnplanet.com
Phone (800) 632-7638 - Fax (617) 873-6351

0 new messages