C Language and Libraries Help (clang.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
vfprintf, vprintf, _vsnprintf, vsprintf
◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
─────Run-Time Library───────────────────────────────────────────────────────
The vfprintf, vprintf, and vsprintf functions format and output
data to <stream>, the standard output, and <buffer>, respectively.
These functions are similar to their counterparts fprintf, printf,
and sprintf, but each accepts a pointer to a list of arguments
instead of an argument list.
The _vsnprintf function differs from vsprintf in that it writes
not more than <count> bytes to <buffer>.
The <format> argument has the same form and function as the
<format> argument for the printf function.
See: ◄Format Specifiers►
◄Escape Sequences►
The <argptr> parameter has type va_list, which is defined in
VARARGS.H and STDARG.H. The <argptr> parameter points to a list of
arguments that are converted and output according to the
corresponding format specifications in the format.
Return Value
The return value for vprintf, vsprintf, and _vsnprintf is the
number of characters written, not counting the terminating null
character. For _vsnprintf, if the number of bytes to write exceeds
<buffer>, then <count> bytes are written and -1 is returned. If
successful, the vfprintf return value is the number of characters
written. If an output error occurs, it is a negative value.
-♦-