Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
sprintf(3) OSS Library Calls Reference Manual
RETURN VALUES
Upon successful completion, this function returns the number of bytes in the output string. Oth-
erwise, a negative value is returned.
The value returned by the sprintf( ) function does not include the final ’\0’ (null) character.
ERRORS
None. The sprintf( ) function does not set errno.
RELATED INFORMATION
Functions: fp_class(3), fprintf(3), isnan(3), toascii(3), putc(3), printf(3), scanf(3).
STANDARDS CONFORMANCE
The POSIX standards leave some features to the implementing vendor to define. The following
features are affected in the HP implementation:
• The output of %p conversion is a decimal integer.
The following are HP extensions to the XPG4 Version 2 specification:
• The conversion specifier L followed by a d, i, o, u, x,orX conversion specifier indicates
that the argument will be treated as a long long or an unsigned long long, which is a 64-
bit integer data type.
6−88 Hewlett-Packard Company 527187-017