Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!think.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsh!daw From: daw@cbnewsh.att.com (David Wolverton) Newsgroups: comp.lang.c Subject: Re: Variable number of arguments Message-ID: <1991May15.163850.17800@cbnewsh.att.com> Date: 15 May 91 16:38:50 GMT References: <1991May13.210257.20240@cunixf.cc.columbia.edu> <726@taumet.com> Organization: AT&T Bell Labs, Holmdel, NJ Lines: 20 In article <726@taumet.com>, steve@taumet.com (Stephen Clamage) writes: > ta-dw30@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@att.com