Re: Formatted printing (D5.1 and D6)
Posted by
Ian Bartholomew-21 on
Mar 25, 2006; 7:45pm
URL: https://forum.world.st/Formatted-printing-D5-1-and-D6-tp3378016p3378018.html
Peter,
> I can't find any reference to this method. Could anyone tell me where to
> start looking, please?
Have a look at the docs for the c++ implementation at
http://www.cplusplus.com/ref/cstdio/sprintf.html I don't think all the
options will work from Dolphin though.
If you are happy using a single fixed font for your document then it's
easy enough.
n := 1.
Transcript view font: (Font name: 'Courier' pointSize: 12).
[n < 10000000] whileTrue: [
Transcript nextPutAll: ('%10d' sprintfWith: n); cr.
n := n * 10]
If you want variable fonts, or want to mix fonts, then it gets a bit
more difficult. Let us know what you are trying to format, and where
you are trying to format it, and we might be able to help.
--
Ian
Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.