Octal notation: severe deprecation

Dan Sommers me at privacy.net
Thu Jan 13 21:26:36 CET 2005


On Thu, 13 Jan 2005 09:56:15 -0500,
Steve Holden <steve at holdenweb.com> wrote:

> I remember using a langauge (Icon?) in which arbitrary bases up to 36
> could be used with numeric literals. IIRC, the literals had to begin
> with the base in decimnal, folowed by a "b" followed by the digits of
> the value using a through z for digits from ten to thirty-five. So

> gunk = 36b8H6Z9A0X

> would have been valid.

Lisp also allows for literals in bases from 2 through 36.

Lisp also allows programs to change the default (away from decimal), so
that an "identifier" like aa is read by the parser as a numeric constant
with the decimal value of 170.  Obviously, this has to be used with
care, but makes reading external data files written in strange bases
very easy.

> nothing-new-under-the-sun-ly y'rs  - steve

every-language-wants-to-be-lisp-ly y'rs,
Dan

-- 
Dan Sommers
<http://www.tombstonezero.net/dan/>
Never play leapfrog with a unicorn.



More information about the Python-list mailing list