Used for initializing a variable to the beginning of the argument list.
#include <varargs.h> (DEC C Extension) void va_start (va_list ap); void va_start_1 (va_list ap, int offset);
The va_start_1 macro initializes ap to the address of an argument that is preceded by a known number of defined arguments. The printf function is an example of a DEC C RTL function that contains a variable-length argument list offset from the beginning of the entire argument list. The variable- length argument list is offset by the address of the formatting string.
When determining value of the offset argument used in va_start_1 the implications of the OpenVMS calling standard must be considered.
On OpenVMS VAX, most argument items are a longword. For example, OpenVMS VAX arguments of types char and short use a full longword of memory when they are present in argument lists. However, OpenVMS VAX arguments of type float use two longwords because they are converted to type double.
On OpenVMS Alpha, each argument item is a quadword.
The preceding version of va_start and va_start_1 is specific to the DEC C RTL, and is not portable.
The following syntax describes the va_start macro in the <stdarg.h> header file, as defined in the ANSI C standard:
#include <stdarg.h> (ANSI C) void va_start (va_list ap, parmN);
Always use this version of va_start in conjunction with functions that are declared and defined with function prototypes. Also use this version of va_start to write portable programs.