Squeak 3.9: using SqNumberParser in Number>>readFrom:

Matthias Berth matthias.berth at googlemail.com
Sun Mar 25 12:20:22 UTC 2007


OK, I have committed to the repository. No SqNumberParser needed, so
it should be compatible to Squeak 3.8. Midway through it, I realized
that the input checking would be best handled by a regular expression.
I still use the normal collection protocol (occurrenceOf:, indexOf:
etc). Would it be OK to use regular expressions or is that another
dependency that people would not like to have?

Matthias

On 3/25/07, Lukas Renggli <renggli at gmail.com> wrote:
> > Thanks a lot. I don't know what went wrong with my saving to the
> > repository, sorry.
> >
> > It looks like visitNumberDescription: will raise an error on negative numbers:
> >
> >   self contents allSatisfy: [ :each | '0123456789.' includes: each ]
> >
> > maybe something like this? :
> >
> >   (self contents allButFirst allSatisfy: [ :each | '0123456789.'
> > includes: each ] )
> >      and:['-0123456789.' includes self contents first]
>
> Indeed, good catch. I will fix this as soon as possible, unless you
> commit your change ;-)
>
> Cheers,
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
>



More information about the Squeak-dev mailing list