gripe: variable arg lists
Henry Spencer
henry at utzoo.UUCP
Sat Nov 17 03:42:33 AEST 1984
> But there is a standard method of dealing with variable argument lists.
> #include <varargs.h>
> The contents of the file differ from machine to machine, but the `entry
> points' are standard.
Unfortunately, the ability to implement <varargs.h> is, to some extent,
machine-dependent. There are some machines where variable argument lists
are very hard to do, and must be kludged in very machine-dependent ways.
> As to why _doprnt() was used: that's pretty easy. There is no standard
> analog to printf which accepts a variable argument list *as an argument*.
There is, however, a portable mechanism to do this job: sprintf followed
by passing the resulting string to whoever wants it.
--
Henry Spencer @ U of Toronto Zoology
{allegra,ihnp4,linus,decvax}!utzoo!henry
More information about the Comp.lang.c
mailing list