[squeak-dev] Bug in Number parsing?
nicolas.cellier.aka.nice at gmail.com
Fri Aug 12 08:26:25 UTC 2011
For the sake of it, I would say things are not worse than before I put
my big nose in the code:
2011/8/12 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
> This was changed in:
> The Trunk: Compiler-nice.125.mcz
> The Trunk: Kernel-nice.404.mcz
> The rationale is that (Number readFrom: ) is a very poor way to report
> a syntax error in the number.
> SqNumberParser can do much better when invoked with ad hoc API.
> This release the necessity for Number>>readFrom: to strictly adhere to
> Smalltalk syntax (which it did not since it also interprets infinity
> and nan).
> 2011/8/12 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
>> Yes, in Squeak this behavior is obtained with the ExtendedNumberParser.
>> You can read these floats for example:
>> Though, in Smalltalk source code, the SqNumberParser is used and you can't.
>> 2011/8/12 Frank Shearar <frank.shearar at gmail.com>:
>>> While playing around, I've found that Number readFrom: '1.' returns
>>> 1.0 ... I'd expected a 1.
>>> Is this expected behaviour?
More information about the Squeak-dev