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

Print formatted text into 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vffpprriinnttff(_f_p, _f_o_r_m_a_t, _a_r_g_u_m_e_n_t_s)
FFIILLEE*_f_p; 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vffpprriinnttff()  constructs a  formatted string  and writes  it into  the stream
pointed  to by  _f_p.  It translates  integers,  floating-point numbers,  and
strings into  a variety of text formats.  vvffpprriinnttff()  can handle a variable
list  of  arguments  of   various  types.   It  is  roughly  equivalent  to
ffp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
describes how to convert a particular data type into text.  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vffp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  file 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vffpprriinnttff(). For
more information, see the Lexicon entry for 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  its  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  *. _a_r_g_u_m_e_n_t_s  can take  only the  data types
acceptable  to the  macro vvaa_aarrgg(),  namely,  the basic  types that  can be
converted to  pointers simply  by adding  a `*' after  the type  name.  See
vvaa_aarrgg() for more information on this point.

If  there   are  fewer  arguments  than   conversion  specifications,  then
vvffpprriinnttff()'s behavior is  undefined (and probably unwelcome).  If there are
more,  vvffp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 conversion  specifier,  then  the behavior  of
vvffpprriinnttff() is undefined.   Thus, presenting an iinntt where vvffpprriinnttff() expects
a cchhaarr * may generate unwelcome results.

If it  wrote the formatted string correctly,  vvffp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vpprriinnttff(), vvsspprriinnttff()
ANSI Standard, section 7.9.6.7

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