Formatted floating point numbers
Helge Horch
Helge.Horch at munich.netsurf.de
Fri Aug 31 18:40:04 UTC 2001
At 12:16 31.08.2001 +0200, Heiko Schaefer wrote:
>I have been trying to find a way to fix the format of a floating
>point number when putting it on a stream. Something like the old
>C style %10.3f thingie.
>I could not find anything like it in Squeak, is there a simple way
>to do it?
There's a goodie (Printf.cs) by Michael Rueger available in the ML
archives, e.g. at
<http://squeak.cs.uiuc.edu/mail/squeak/msg03429.html>. It's from the 2.8a
days, but seems to work OK in 3.1a as far as I can see.
Also check out <http://www.dnsmith.com/squeak/formatter.html>, but last I
looked, the floating point formatting was disabled.
HTH,
Helge
More information about the Squeak-dev
mailing list
|