|Anonymous | Login||01-22-2020 03:27 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details [ Jump to Notes ]||[ View Advanced ] [ Issue History ] [ Print ]|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0007050||[Squeak] Kernel||minor||always||05-16-08 10:56||05-25-08 18:35|
|Summary||0007050: String to Number conversion error|
In Integer class>>readFrom:base:
conversion '.2' asNumber (String asNumber)
image 3.8.1 ->error
image 3.9 ->Float .2, but this fix is wrong (for example Color fromString: 'yellow' return Color black, because, this method expect error.
So I think bug is in every version.
I send you right solution
Integer.st [^] (49,311 bytes) 05-16-08 10:56
Integer class-readFrombase.st [^] (1,026 bytes) 05-17-08 17:43
(0012103 - 742 - 838 - 838 - 838 - 838 - 838)
edited on: 05-17-08 04:32
Thanks for pointing out the inconsistancy.
Surely at least one version is in error.
Please describe what you think to be the correction.
The upload seems to be the intire Integer class, To file out specific methods you have to call up the menu in the method pane.
To file out a bunch of methods in the same catagory you need to file out from the catagory pane.
To pick and choose methods to file out you need to file them out from a change sorter (dual change sorters are the tool of choice since it lets you move methods from one change set to another.)
Off hand I would guess that 3.8.1 is right and 3.9 is wrong.
0.2 is a float .2 is an error or maybe even a poorly separted . 2 which would be 2
(0012105 - 225 - 246 - 246 - 246 - 246 - 246)
Ok, I upload Integer class>readFrom:base:
And I think, that '.2' is correct string to conversion(why not?)
I'm doing new Scamper from CSS 2.1 specification and values as .2 are supported, so I must support this conversion
(0012162 - 415 - 467 - 467 - 579 - 579 - 579)
.2 used to be accepted (whether accidentally or on purpose?), but it should not, it is not a valid Smalltalk syntax.
A subclass of SqNumberParser could however parse this kind of Number (I have a FORTRAN Number Parser doing this).
If you load patches from 0006982 , then
Integer readFrom: '.2'.
will (IMO correctly) raise an Error
Why do you think it is important to answer zero rather than raise an Error?
|05-16-08 10:56||zakletejTermix||New Issue|
|05-16-08 10:56||zakletejTermix||File Added: Integer.st|
|05-17-08 04:30||wiz||Note Added: 0012103|
|05-17-08 04:32||wiz||Note Edited: 0012103|
|05-17-08 17:43||zakletejTermix||File Added: Integer class-readFrombase.st|
|05-17-08 17:48||zakletejTermix||Note Added: 0012105|
|05-25-08 18:35||nicolas cellier||Note Added: 0012162|
| Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
49 total queries executed.|
33 unique queries executed.