Formatted numeric output: Difference between revisions

Content deleted Content added
Line 1,228: Line 1,228:
notice that printOn:* is implemented in Object;thus any object can be printed with padding this way.
notice that printOn:* is implemented in Object;thus any object can be printed with padding this way.


using the PrintfScanf utility:
Using the PrintfScanf utility:
<lang smalltalk>PrintfScanf new printf:'%08.3f' arguments: { 7.125 }</lang>
<lang smalltalk>PrintfScanf new printf:'%08.3f' arguments: { 7.125 }</lang>