[ENH] Case independent numbers
bert at isgnw.CS.Uni-Magdeburg.De
Wed Mar 1 10:24:15 UTC 2000
On Mon, 28 Feb 2000, Jarvis, Robert P. (Contingent) wrote:
> > >I wrote:
> > >who of you really would expect that 16r1e5 equals 1048576 while 16r1E5 is
> > >485? If not too many, I propose to make hex numbers case independent, and
> > >exponent notation, too.
> > Dan wrote:
> > I have a problem with this, Bert.
> > The way it is, there is a simple syntactic rule for numbers.
> > Your changes imply a rule that is not syntactic, but value-dependent:
> > 16r1E5 = 485, but
> > 14r1E5 = 537824
> I agree strongly with both positions. :-)
Err, the one is the opposite of the other.
> To me it's astonishing that numbers vary based on capitalization in bases,
> especially since the parser only accepts bases from 2 to 36, which means
> there should be no ambiguity. Thus, in accordance with Dan's "Principle of
> Least Astonishment", this needs to be changed. Here's a real simple
> changeset to take care of this:
> <<Character##digitValue fix-rpj.1.cs>>
Hey, what's better in this than in mine? ;-)
More information about the Squeak-dev