Re: Literals, take 2

[email protected] (Michael Lazzaro) Thu, 14 Nov 2002 10:00:37 -0800
Newsgroups perl.perl6.documentation
Message-ID <[email protected]>
On Thursday, November 14, 2002, at 12:24  AM, Dave Storrs wrote:
> Does this mean that you can't use _ in numbers if the radix is higher 
> than 16?  (For example, in base 20, the letters A-J should be 
> considered to be digits...can you put underscores between them?)

No, that should be fine... just like in hex, a-f are fine.

> Also, on this subject...what happens if I want to use "letter 
> notation" in a base higher than 36?

We should talk about this.  My original proposal was to do this:

(Case 1) base 2-10: use 0..9

(Case 2) base 11-36: use (0..9, a..z), but allow A..Z such that

	0x00ff == 0x00FF

.... which seems necessary, IMHO.

(Case 3) base 37-62: use (0..9,a..z,A..Z), such that

	60:ff != 60:FF

.... this is obviously inconsistent w/ Case (2), but is darn useful 
sometimes.

MikeL