Next: Redirecting Output of print and printf, Previous: Controlling Numeric Output with print, Up: Printing Output [Contents][Index]
printf Statements for Fancier PrintingFor 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).