variable number of strings passed to function - how?

Doug Gwyn gwyn at smoke.BRL.MIL
Tue Oct 25 06:05:17 AEST 1988


In article <3542 at ihuxz.ATT.COM> burris at ihuxz.ATT.COM (Burris) writes:
>I appreciate some of the responses that pointed out my omission of
>possibly important facts but some of you folks could stand to come down
>from your "high horse" long enough to take things in the nature they
>were intended, as attempts to be helpful to someone asking for solutions
>to problems they wish to solve.

Probably the main reason you were flamed for your attempt to be helpful
is that the advice you gave was poor.  There is a well-defined mechanism
for dealing with variable function arguments, and users of the mechanism
do not have to worry about their code breaking in mysterious ways when
it is ported to a different architecture, as it would have had your
advice been followed.  Whenever a fairly convenient portable solution
to a problem exists, it should be used in preference to one that relies
on nonportable details of a particular implementation.

It is particularly galling to see such a suggestion coming out of AT&T,
considering all the hours I have spent in tracking down and fixing this
exact problem in source code that AT&T licensed commercially.  I hope
you AT&T hackers learn how to use the official variable argument
mechanism and save us all a lot of unnecessary grief.



More information about the Comp.lang.c mailing list