[FIX][BUG] Conversion of String to Number don''t check negatives ([cd][er][su][et][sm] resubmit )

stéphane ducasse ducasse at iam.unibe.ch
Tue Oct 5 06:34:46 UTC 2004


Hi guys

can one of you summarise the situation: we are unstable so we can 
remove changes in no time?

Stef


On 5 oct. 04, at 00:22, Alexander Lazarević wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> I made the second version of that fix in a hurry and just noticed that
> after I submitted the code. I hesitated to send a changed fix right
> away, because I had doubts that this is really the best solution.
> Now I think we better should make asInteger be equivalent to asNumber
>
> asInteger
> ~    ^Integer readFromString: self
>
> and have a new method firstInteger (or extractFirstInteger) that does
> the job of former asInteger, but to return 0 instead of nil in case
> there are no digits in the string. This would be the changes for the
> senders
>
> asInteger            firstInteger
> asSignedInteger      firstInteger
> asUnsignedInteger    firstInteger abs
>
>
> Alex
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (MingW32)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> iD8DBQFBYc0yYiF2wSTEZ9gRAuEaAKDkfsE81Z0N4z2nCXgKGr56cvnDEgCgzgWd
> 6r+5B0eLePZj4k7/b11hEwg=
> =yQm+
> -----END PGP SIGNATURE-----
>
>




More information about the Squeak-dev mailing list