Passing Variable Numbers of Arguments

Henry Spencer henry at zoo.toronto.edu
Tue Feb 12 09:58:15 AEST 1991


In article <5196 at media-lab.MEDIA.MIT.EDU> dyoung at media-lab.media.mit.edu.UUCP (David Young) writes:
>I'd like to be able to write a macro or a function that will take an
>unspecified number of arguments...

For a function, you'll need to use <stdarg.h> (ANSI C) or <varargs.h> (many
old implementations).  Can't be done with a macro at all.
-- 
"Read the OSI protocol specifications?  | Henry Spencer @ U of Toronto Zoology
I can't even *lift* them!"              |  henry at zoo.toronto.edu  utzoo!henry



More information about the Comp.lang.c mailing list