Parsing Numbers

Tom Phoenix rootbeer at redcat.com
Sat Sep 17 19:10:53 UTC 2005


It seems that we must choose which rule we want:

Rule 1: In writing numerals in a radix past base ten, capital letters
must be used to represent the extra digits. Under this rule, 16r1E4 is
the hexadecimal number 1E4 (484), but 16r1e4 is 65536.

Rule 2: In writing numerals in a radix past base ten, bare exponents
are disallowed. Under this rule, 16r1E4 and 16r1e4 are equal to 484.
(Under this rule, 16r1e+4 may still be used to denote 65536, if we
wish to allow such a thing.)

Is there any alternative rule that's any better than either of these?

As a side issue, we should decide whether 'd' and 'q' can stand in for
'e'. I'm sure that allowing that would help somebody, and it's not
likely to cause many problems, once we decide which of the above rules
to use.

--Tom Phoenix



More information about the Squeak-dev mailing list