Previous Topic | Table of Contents | Next Topic

Printf Format Directives

These argument formats are recognized by printf:
%c Single character.
%d Decimal number.
%e [-]d.dddddde[+-]ddd
%f [-]ddd.dddddd
%g %e or %f formatting, whichever is shorter.
%o Unsigned octal number.
%s String.
%x Unsigned hexadecimal number.
%% Literal % character.
Additional parameters may lie between the % and the control letter:
- Left-justify expression in its field.
width Pad field to this width as needed; leading 0 pads with zeros.
.prec Maximum string width or digits to right of decimal point.



Previous Topic | Table of Contents | Next Topic

Copyright © 1988-2003 by Hamilton Laboratories. All rights reserved.