Anonymous | Login | 01-26-2021 02:50 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 | ||||
0003512 | [Squeak] Kernel | minor | always | 04-28-06 01:23 | 07-14-06 21:19 | ||||
Reporter | nicolas cellier | View Status | public | ||||||
Assigned To | |||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.9 | ||||||
Summary | 0003512: Number>>readFrom: does not handle error cases correctly | ||||||||
Description |
Number>>readFrom: when encountering a malformed number is not behaving well. Either it does return 0. Number readFrom: ''. Number readFrom: 'foo-bar'. Either it fails when it should not Number readFrom: '1e'. Number readFrom: '1s'. Either it succeeds when it should not Number readFrom: '--1'. |
||||||||
Additional Information | |||||||||
Attached Files |
![]() ![]() |
||||||||
|
![]() |
|
(0004889 - 624 - 726 - 1104 - 1104 - 1104 - 1104) nicolas cellier 05-07-06 21:24 |
[FIX] i attach a SqNumberParser class that can fix: - all these weird behaviours - reading of floating point numbers (round to nearest floating point value) - reading of -0.0 ( http://bugs.impara.de/view.php?id=3482 [^] ) First load the two patches correcting: Integer>>asFloat http://bugs.impara.de/view.php?id=3564 [^] and Fraction>>asFloat at http://bugs.impara.de/view.php?id=3568 [^] TODO: branch SqNumberParser on Number>>readFrom: TODO: add a specific NumberParserError or NumberParserException With the patch, you cannot read '3.e-3' nor '.3e-3' anymore, but these weren't identified as proper squeak syntax... |
(0005497 - 336 - 348 - 348 - 444 - 444 - 444) lewis 07-04-06 15:40 |
This is faster and better than the current number parsing in class Number. I have provided a cleanup to the current parser in Mantis 0003993, but I really think that this NumberParser is a better approach. These change sets can be added to the current Squeak image with no impact on the existing parser, so this would be a safe change. |
(0005908 - 4 - 4 - 4 - 4 - 4 - 4) MarcusDenker 07-14-06 21:19 |
7045 |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
51 total queries executed. 36 unique queries executed. |