Sorry, I'm trying to do too many things at the same time...
Am 02.06.14 13:40, schrieb jtuc...@objektfabrik.de:
Okay, here we go ;-)
VisualWorks also prints the trailing zeros. So maybe the weirdness
lies on the VAST side ;-)
VisualWorks also prints the ScaledDecimal without its scale.
it prints FixedPoint, not ScaledDecimal...
It does parse all three correctly: 0.500s3 0.5s3 0.500
the last one should be 0.500s
Joachim
Am 02.06.14 13:35, schrieb jtuc...@objektfabrik.de:
Am 02.06.14 13:03, schrieb Sven Van Caekenberghe:
Apart from the class name, another issue is that 0.5s3 prints as
0.500s3 in Pharo, the trailing zeros are possibly not added everywhere.
Hmm, that looks strange to me. If you DisplayIt a 0.5s3 in VAST, you
get 0.5. If you inspect it, it is debugPrint'ed as 0.5s3.
I would tend to say that Pharo's display string is strange, not
necessarily incorrect. I don't have access to the ANSI standard, but
I guess the fact that there is the s3 already, which says there are 3
digits in the fraction part, alrady says enough.
Pharo does parse 0.5s3 correctly, so it can probably juist be
accepted as a harmless weirdness. VAST, otoh, also parses 0.500s3
correctly, so it seems there is no harm done in exchange between VAST
and Pharo. Not sure about VW, however.
Another question: doesn't creating a fraction when you parse a
ScaledDecimal make life a bit harder than it should be in terms of
CPU cycles burnt? Not that this matters for a few hundred or thousand
numbers, but it might for large files.... Precision-wise there is no
gain in it, right?
Joachim
--
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel mailto:jtuc...@objektfabrik.de
Fliederweg 1 http://www.objektfabrik.de
D-71640 Ludwigsburg http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1