Manpage of VA_ARG

Google
Web www.fiveanddime.net

VA_ARG

Section: NEWLIB (3)
Updated: 2005 Feb 23
Index Return to Main Contents
 

NAME

13.1.2 Extract a value from argument list -----------------------------------------

 

SYNOPSIS


     #include <stdarg.h>
     TYPE va_arg(va_list AP, TYPE);

 

DESCRIPTION

`va_arg' returns the next unprocessed value from a variable argument list AP (which you must previously create with VA_START). Specify the type for the value as the second parameter to the macro, TYPE.


   You may pass a `va_list' object AP to a subfunction, and use `va_arg' from the subfunction rather than from the function actually declared with an ellipsis in the header; however, in that case you may _only_ use `va_arg' from the subfunction. ANSI C does not permit extracting successive values from a single variable-argument list from different levels of the calling stack.


   There is no mechanism for testing whether there is actually a next argument available; you might instead pass an argument count (or some other data that implies an argument count) as one of the fixed arguments in your function call.

 

RETURNS

`va_arg' returns the next argument, an object of type TYPE.

 

PORTABILITY

ANSI C requires `va_arg'.

 

SEE ALSO

va_arg is part of the libc library. The full documentation for libc is maintained as a Texinfo manual. If info and libc are properly installed at your site, the command
info libc

will give you access to the complete manual.


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURNS
PORTABILITY
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 21:25:33 GMT, May 16, 2005



www.fiveanddime.net








Google
Web www.fiveanddime.net