POSITION:028,114
COLOUR:STANDARD
TEXT:00,It is sometimes necessary to display additional screen output to help
TEXT:16,clarify information. This process is called "print formatting".
TEXT:16,Examples of print formatting are adding commas and dollar signs to
TEXT:16,financial figures or to limit the number of decimal places shown in
TEXT:16,scientific data. We can use the library routine printf() to display
TEXT:16,formatted screen output:
COLOUR:POINTS
TEXT:32,                    s o
COLOUR:EUPHORIA
TEXT:00,           printf(1, , )
COLOUR:STANDARD
TEXT:32,printf() prints data (shown as  ) as a character string on the screen
COLOUR:POINTS
TEXT:00,                               o
COLOUR:STANDARD
TEXT:16,just like puts(). Before it does this, however, it formats the data
TEXT:16,using a format string (shown as  ). The format string must contain
COLOUR:POINTS
TEXT:00,                                s
COLOUR:STANDARD
TEXT:16,special format codes that will edit the way the data will appear on the
TEXT:16,screen, and optionally, some extra text. The data to be displayed can
TEXT:16,either be a single atom value, or a sequence that contains a list of
TEXT:16,values to be edited using the format string.
