Another printf-type question

gwyn at BRL.ARPA gwyn at BRL.ARPA
Tue Jul 15 16:06:24 AEST 1986


invprintf(fmt,_0,_1,_2,_3,_4,_5,_6,_7,_8,_9)

is not a portable solution.  In some cases an attempt to invoke
it with a small actual parameter count can even lead to abnormal
process termination.

The reason <varargs.h> or <stdarg.h> exist is to provide the
hooks necessary for implementation of a portable solution;
the other half of the solution requires something like the
v*printf() functions.

The fellow asked the great gurus what he *should* have done.
Why do you feed him that garbage in return?  If it's to show
us that you don't believe in writing portable code, we knew
that already from your ravings about how the VAX is the only
sane architecture.



More information about the Comp.lang.c mailing list