

va_arg()                Variable Arguments               va_arg()




Return pointer to next argument in argument list

#iinncclluuddee <ssttddaarrgg.hh>
_t_y_p_e_n_a_m_e *vvaa_aarrgg(_l_i_s_t_p_t_r, _t_y_p_e_n_a_m_e)
vvaa_lliisstt _l_i_s_t_p_t_r, _t_y_p_e_n_a_m_e;

vvaa_aarrgg  returns a  pointer to  the next  argument in  an argument
list.  It can be used  with functions that take a variable number
of  arguments,  such  as pprriinnttff  or  ssccaannff,  to  help write  such
functions portably.   It is always used  with vvaa_eenndd and vvaa_ssttaarrtt
within a function that takes a variable number of arguments.

_l_i_s_t_p_t_r  is  of type  vvaa_lliisstt,  which is  defined  in the  header
ssttddaarrgg.hh.  This object  must first  be  initialized by  the macro
vvaa_ssttaarrtt.

_t_y_p_e_n_a_m_e is the name of the  type for which vvaa_aarrgg is to return a
pointer.  For example, if you  wish vvaa_aarrgg to return a pointer to
an integer, _t_y_p_e_n_a_m_e should be of type iinntt.

vvaa_aarrgg can only  handle ``standard'' data types, i.e., those data
types  that  can  be  transformed  to  pointers by  appending  an
asterisk `*'.

***** Example *****

For  an  example  of  this  macro,  see the  entry  for  vvaarriiaabbllee
aarrgguummeennttss.

***** See Also *****

vvaarriiaabbllee aarrgguummeennttss

***** Notes *****

If there is no next argument for vvaa_aarrgg to handle, or if _t_y_p_e_n_a_m_e
is incorrect, then the behavior of vvaa_aarrgg is undefined.

The ANSI  Standard demands that  vvaa_aarrgg be implemented  only as a
macro.  If  its macro definition is  suppressed within a program,
its behavior is undefined.















COHERENT Lexicon                                           Page 1


