Used for returning the next item in the argument list.
Format
#include <stdarg.h> (ANSI C)
#include <varargs.h> (DEC C
Extension)
type va_arg (va_list ap, type);
Arguments
- ap
- A variable list containing the next argument to be obtained.
- type
- A data type that is used to determine the size of the next item
in the list. An argument list can contain items of varying sizes,
but the calling routine must determine what type of argument is
expected since it cannot be determined at run time.
Description
This function interprets the object at the address specified
by the list incrementor according to type. If there is no
corresponding argument, the behavior is undefined.
When using va_arg to write portable applications, include the
<stdarg.h> header file (defined by the ANSI C standard), not the
<varargs.h> header file, and use va_arg only in conjunction with
other functions and macros defined in <stdarg.h>.
Previous Page | Next Page | Table of Contents | Index