HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
p
printf(3S) printf(3S)
To create a language independent date-and-time printing routine write:
printf(format,weekday,month,day,hour,min,2,2);
For American usage, format would point to the string:
"%1$s, %2$s %3$d, %4$*6$.*7$d:%5$*6$.*7$d"
and result in the output:
"Sunday, July 3, 10:02"
For German usage, the string:
"%1$s, %3$s %2$d, %4$*6$.*7$d:%5$*6$.*7$d"
results in the output:
Sonntag, 3 Juli 10:02
WARNINGS
Notice that with the c conversion character, an int arg is converted to an unsigned char. Hence, whole
multibyte characters cannot be printed using a single c
conversion character.
A precision with the
s conversion character might result in the truncation of a multibyte character.
Use of a conversion character which doesn’t match the type of the corresponding argument passed in will
result in invalid data being returned. For example, the modifying ll, specifying that the following
d, i, o,
u, x,orX conversion character applies to a long long integer arg, is necessary for proper results when the
argument is a long long integer.
AUTHOR
printf(), fprintf(), and sprintf() were developed by AT&T and HP.
SEE ALSO
ecvt(3C), ltostr(3C), setlocale(3C), putc(3S), scanf(3S), stdio(3S), orientation(5).
STANDARDS CONFORMANCE
printf(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C
fprintf(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C
sprintf(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C
Section 3−−630 − 5 − HP-UX Release 11i: December 2000
___
___