|
|
1.1 root 1:
2:
3: va_arg() Variable Arguments va_arg()
4:
5:
6:
7:
8: Return pointer to next argument in argument list
9:
10: #iinncclluuddee <ssttddaarrgg.hh>
11: _t_y_p_e_n_a_m_e *vvaa_aarrgg(_l_i_s_t_p_t_r, _t_y_p_e_n_a_m_e)
12: vvaa_lliisstt _l_i_s_t_p_t_r, _t_y_p_e_n_a_m_e;
13:
14: vvaa_aarrgg returns a pointer to the next argument in an argument
15: list. It can be used with functions that take a variable number
16: of arguments, such as pprriinnttff or ssccaannff, to help write such
17: functions portably. It is always used with vvaa_eenndd and vvaa_ssttaarrtt
18: within a function that takes a variable number of arguments.
19:
20: _l_i_s_t_p_t_r is of type vvaa_lliisstt, which is defined in the header
21: ssttddaarrgg.hh. This object must first be initialized by the macro
22: vvaa_ssttaarrtt.
23:
24: _t_y_p_e_n_a_m_e is the name of the type for which vvaa_aarrgg is to return a
25: pointer. For example, if you wish vvaa_aarrgg to return a pointer to
26: an integer, _t_y_p_e_n_a_m_e should be of type iinntt.
27:
28: vvaa_aarrgg can only handle ``standard'' data types, i.e., those data
29: types that can be transformed to pointers by appending an
30: asterisk `*'.
31:
32: ***** Example *****
33:
34: For an example of this macro, see the entry for vvaarriiaabbllee
35: aarrgguummeennttss.
36:
37: ***** See Also *****
38:
39: vvaarriiaabbllee aarrgguummeennttss
40:
41: ***** Notes *****
42:
43: If there is no next argument for vvaa_aarrgg to handle, or if _t_y_p_e_n_a_m_e
44: is incorrect, then the behavior of vvaa_aarrgg is undefined.
45:
46: The ANSI Standard demands that vvaa_aarrgg be implemented only as a
47: macro. If its macro definition is suppressed within a program,
48: its behavior is undefined.
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64: COHERENT Lexicon Page 1
65:
66:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.