Numeric literals in other than base 10

robin robin_v at bigpond.com
Thu Aug 27 12:07:20 EDT 2009


"James Harris" <james.harris.1 at googlemail.com> wrote in message
news:bc3607b3-7fdd-43fd-8ede-66ac3f597403 at 32g2000yqj.googlegroups.com...
On 22 Aug, 10:27, David <71da... at libero.it> wrote:

>They look good - which is important. The trouble (for me) is that I
>want the notation for a new programming language and already use these
>characters. I have underscore as an optional separator for groups of
>digits - 123000 and 123_000 mean the same. The semicolon terminates a
>statement. Based on your second idea, though, maybe a colon could be
>used instead as in

XPL uses "(2)1011" for base 4,
"(3)03212" for octal,
"(4)0741" for base 16.

PL/I uses 8FXN for numeric hex and X suffix for a hex character constant.







More information about the Python-list mailing list