Re: Numeric Literals (Summary 2)
[email protected] (Michael Lazzaro) Mon, 18 Nov 2002 11:28:17 -0800
| Newsgroups | perl.perl6.documentation |
|---|---|
| Message-ID | <[email protected]> |
On Monday, November 18, 2002, at 10:57 AM, Michael Lazzaro wrote:
<summary list>
.... Eek, that one was short-lived! No problem: if Larry decides on Ada
syntax, the following changes happen:
s/:/#/ (for explicit radix)
s/./:/ (for dotted -- er, coloned -- form)
- floating point becomes allowed in explicit radix (and 0b,0c,0x)
Everything else stays the same.
> Other issues w/ literals:
>
> - radix <= 32, alpha digits may be upper or lowercase
> - underlines may appear ONLY between digits
> - dotted form may therefore not have underlines
> - radix < 2 throws error
> - negative sign goes before radix, e.g. -20:1GJ, in
> order to match usage in cases like -0x00ff.
> - need to specify RADIX_MAX
>
> - can't have runtime radix, e.g. 2**8:10, because : binds
> tighter. can't say (2**8):10, because not a literal
> anymore, and ':' is used for adverbial in many locations
> (ambiguous).
>
> - need to verify that 0b1, 0c1, 0x1 are still allowed in addition to
> explicit radix (but seems appropriate to leave them in, given their
> frequency.)
MikeL