Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
vprintf - formatted output to standard out
&pagelevel(4)&pagelevel
Syntax | #include <stdio.h> int vprintf(const char *format, va_list arg); |
Description | vprintf() is the same as the printf() function. In contrast to printf() , vprintf() allows for the output of arguments whose number and data type are not known at the time of compilation.
vprintf() is used in functions that can be passed a different format string as well as different arguments for output from the caller. The format string format stands for the formal parameter list of the function definition and a variable argument list ", ...". format is a format string just like for printf() with ANSI functionality (see printf() ).
vprintf() processes an argument list arg with successive internal va_arg calls and writes the arguments to the standard output stdout according to the format string format. The variable argument list arg must be initialized before calling vprintf() using the va_start macro.
|
Return val. | Number of characters to be output |
| if successful. |
Integer< 0 | if an error occurs |
Notes | vprintf() always starts with the first argument in the variable argument list. It is possible to start output from any particular argument by issuing the appropriate number of va_arg calls before calling the vprintf() function. Each va_arg call advances the position in the argument list by one argument.
vprintf() does not call the va_end macro. Since vprintf() uses the va_arg macro, the value of arg is undefined upon returning.
BS2000 The following applies in the case of text files with SAM access mode and variable record length for which a maximum record length is also specified: When the specification split=no was entered for fopen() , records which are longer than the maximum record length are truncated to the maximum record length when they are written. By default or with the specification split=yes , these records are split into multiple records. If a record has precisely the maximum record length, a record of the length zero is written after it. (End) |
See also | vfprintf() , vsprintf() .
|