Variable argument lists.

Henry Spencer henry at utzoo.uucp
Fri May 13 02:57:28 AEST 1988


> In this example (with <varargs.h>) I scan the argument list
> twice.  Once to get a count, the next to do the real work.
> Something similar should work in ANSI.  Can anyone tell me
> if I'm wrong (again! :-( ).  This assumes all the arguments
> are char* ...

Looks okay to me, provided that the argument list is terminated (by
the user -- the compiler won't do it for you) with a null pointer of
the correct type.
-- 
NASA is to spaceflight as            |  Henry Spencer @ U of Toronto Zoology
the Post Office is to mail.          | {ihnp4,decvax,uunet!mnetor}!utzoo!henry



More information about the Comp.lang.c mailing list