(ANSI Standard)
#include <stdarg.h> #include <stdio.h> nout = vprintf(format,varlist);
"vprintf" is the same as "printf" except that it prints out a number of values from a variable argument list. The "varlist" variable must have been initialized with the "va_start" macro. If there have already been calls to "va_arg" to obtain arguments from the variable list, "vprintf" will start at the first argument that has not yet been obtained through "va_arg". "vprintf" effectively uses "va_arg" to obtain arguments from the variable list; therefore a call to "va_arg" after "vprintf" will obtain the argument AFTER the last argument printed.
After a call to "vprintf", the "varlist" variable should be assumed to be in an undefined state. If you want to use "varlist" again, you must call "va_end" to clean up, then "va_start" to reinitialize it.
Copyright © 1996, Thinkage Ltd.