vvpprriinnttff() -- STDIO Function (libc)

Print formatted text into standard output stream
#iinncclluuddee <ssttddaarrgg.hh>
#iinncclluuddee <ssttddiioo.hh>
iinntt
vvpprriinnttff(_f_o_r_m_a_t, _a_r_g_u_m_e_n_t_s)
cchhaarr *_f_o_r_m_a_t; vvaa_lliisstt _a_r_g_u_m_e_n_t_s;

vvpprriinnttff() constructs  a formatted  string and  writes it into  the standard
output stream.  It translates integers, floating-point numbers, and strings
into a  variety of  text formats.   vvpprriinnttff can handle  a variable  list of
arguments  of  various  types.   It  is  roughly equivalent  to  pprriinnttff()'s
conversion specifier %rr.

_f_o_r_m_a_t points  to a string that can contain  text, character constants, and
one or more  _c_o_n_v_e_r_s_i_o_n _s_p_e_c_i_f_i_c_a_t_i_o_n_s.  A conversion specification defines
how  a particular  data type  is converted into  a particular  text format.
Each conversion specification is introduced with the percent sign `%'.  (To
print a  literal percent sign, use the escape  sequence `%%'.) See pprriinnttff()
for further  discussion of the conversion specification and  for a table of
the type specifiers that can be used with vvpprriinnttff().

After _f_o_r_m_a_t comes _a_r_g_u_m_e_n_t_s. This 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. It has  been initialized by the  macro vvaa_ssttaarrtt() and
points  to the  base  of the  list  of arguments  used  by vvpprriinnttff().  Each
argument must have basic type that  can be converted to a pointer simply by
adding  an `*'  after the  type name.   This is  the same  restriction that
applies to  the arguments to the macro vvaa_aarrgg().  For more information, see
vvaa_aarrgg().

_a_r_g_u_m_e_n_t_s should  access one argument for  each conversion specification in
_f_o_r_m_a_t of  the type appropriate to  conversion specification.  For example,
if  _f_o_r_m_a_t contains  conversion specifications  for an iinntt,  a lloonngg,  and a
string, then _a_r_g_u_m_e_n_t_s access three arguments, being, respectively, an iinntt,
a lloonngg, and a cchhaarr *.

If there are fewer arguments than conversion specifications, then vvpprriinnttff's
behavior is  undefined (and probably  unwelcome).  If there  are more, then
vvpprriinnttff() evaluates and then ignores every argument without a corresponding
conversion specification.   If an argument is  not of the same  type as its
corresponding  type  specification,  then  the  behavior  of  vvpprriinnttff()  is
undefined;  thus, accessing  an iinntt  where vvpprriinnttff() expects  a cchhaarr  * may
generate unwelcome results.

If it  writes the formatted string correctly,  vvpprriinnttff() returns the number
of characters written; otherwise, it returns a negative number.

_S_e_e _A_l_s_o
ffpprriinnttff(), lliibbcc, pprriinnttff(), sspprriinnttff(), vvffpprriinnttff(), vvsspprriinnttff()
ANSI Standard, section 7.9.6.8

_N_o_t_e_s
vvpprriinnttff() can construct a string up to at least 509 characters long.
