Variable number of arguments

David Wolverton daw at cbnewsh.att.com
Thu May 16 02:38:50 AEST 1991


In article <726 at taumet.com>, steve at taumet.com (Stephen Clamage) writes:
> ta-dw30 at cunixa.cc.columbia.edu (David Worenklein) writes:
> 
> >I know I can pull a variable number of arguments off of the stack using va_...
> There is no portable way to do this; I don't know whether Think C
> provides some extension.
> [good suggestions deleted]

Please think long and hard about using such an extension, even if
it is available.  You'll save a lot of work on the part of the
person who has to port the code next year to another compiler or
environment that doesn't have the neat extension.
And remember, that person may be you.

Stephen gives some good approaches to identifying the length and/or
end of the list -- use them!


Dave Wolverton
David.Wolverton at att.com



More information about the Comp.lang.c mailing list