String>>asInteger does not like negative integers
Nevin Pratt
nevin at bountifulbaby.com
Wed Aug 4 14:51:02 UTC 2004
Anybody have any insight on why String>>asInteger doesn't seem to think
negative integers are really integers? It is "fixable" with #asNumber,
as follows:
'-1' asInteger --> 1
'-1' asNumber asInteger --> -1
Shouldn't String>>asInteger be smarter than that, and not ignore
negative integers?
This behavior is verified on 3.5, 3.6, and 3.7. So, it's been around
for awhile.
Nevin
More information about the Squeak-dev
mailing list
|