Powers of C

Ray Butterworth rbutterworth at watmath.UUCP
Fri Jul 11 22:48:02 AEST 1986


>                                   I suppose the series of functions
> errf(), ferrf(), serrf(), verrf(), vferrf(), vserrf() would suffice.
> -- 
> In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516)

Isn't it interesting how every time you write a printf-like function
you also have to write a v-version of it too?  I guess that's one way
of getting free advertising for system V.

Our solution at waterloo was to introduce a %v format which takes the
next two arguments as the format string and the argument list pointer.
That way you only have to write one version of each function, the
other version comes for free.  It also means you can have things like
"%s: %v: %s\n" in a single call instead of having to make three calls.
This is like the "%r" format that occasionally pops up in versions
of stdio but it doesn't require that the format be on the stack with
the arguments, and it doesn't act like a goto.



More information about the Comp.lang.c mailing list