Parsing Numbers

stéphane ducasse ducasse at iam.unibe.ch
Sat Sep 17 19:28:16 UTC 2005


On 17 sept. 05, at 21:10, Tom Phoenix wrote:

> 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.

I would prefer that we follow the standard Smalltalk way of doing  
that and
that we keep e if d and q are just equivalent, it does not seem to me  
a good
reason to change and (possibly break existing code if we try to  
recompile all the image
for example).

Stef
>
> --Tom Phoenix
>
>
>




More information about the Squeak-dev mailing list