Variable argument lists.
Jan Gray
jangr at microsoft.UUCP
Mon May 16 16:09:23 AEST 1988
In article <1740 at rpp386.UUCP> jfh at rpp386.UUCP (The Beach Bum) writes:
>the addition of an extra instruction to stack the number of arguments
>can hardly be considered significantly slowing down a function call.
Right. Slow down every function call ever, just so you can use your
nargs() function once in a blue moon. On machines with fast function
calls (e.g. SPARC, which typically stacks no arguments), *any* extra work
is extremely significant.
Try
char *cat(int nargs, ...);
cat(6, "lets", "move", "on", "to", "something", "else");
"The addition of an extra parameter to specify the number of arguments can
hardly be considered significantly slowing down a function call."
Jan Gray uunet!microsoft!jangr Microsoft Corp., Redmond Wash. 206-882-8080
More information about the Comp.lang.c
mailing list