va_arg()

get next argument in variable argument list 

Function


SYNOPSIS

#include <stdarg.h>

arg_type va_arg(va_list p, arg_type);


DESCRIPTION

The va_arg() macro returns the next argument in the variable argument list pointed to by p. Each invocation of va_arg() modifies p such that the values of successive arguments are returned in turn. The type parameter is the type the argument is expected to be. This is the type name specified such that the type of a pointer to an object that has the specified type can be obtained simply by suffixing a * to type. Different types can be mixed, but it is up to the routine to know what type of argument is expected.

The list p must be initialized by calling va_start() before any calls to va_arg(). The list p must be finalized by calling va_end().


PARAMETERS

p 

Points to the variable argument list.

arg_type 

Specifies the argument type.


RETURN VALUES

The va_arg() macro returns a pointer to the next argument in list p.


CONFORMANCE

ANSI-ISO 9899-1990.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
va_end(), va_start()


PTC MKS Toolkit 10.4 Documentation Build 39.