| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
5.5 Using printf Statements for Fancier Printing
For more precise control over the output format than what is
provided by print, use printf.
With printf you can
specify the width to use for each item, as well as various
formatting choices for numbers (such as what output base to use, whether to
print an exponent, whether to print a sign, and how many digits to print
after the decimal point). You do this by supplying a string, called
the format string, that controls how and where to print the other
arguments.
5.5.1 Introduction to the printf Statement | Syntax of the printf statement.
| |
| 5.5.2 Format-Control Letters | Format-control letters. | |
5.5.3 Modifiers for printf Formats | Format-specification modifiers. | |
5.5.4 Examples Using printf | Several examples. |
This document was generated on March 30, 2012 using texi2html 5.0.