Variable argument lists.
Scott Daniels
daniels at teklds.TEK.COM
Sat May 14 11:08:24 AEST 1988
In article <300 at teletron.UUCP> andrew at teletron.UUCP (Andrew Scott) writes:
>In article <3080 at teklds.TEK.COM>, daniels at teklds.TEK.COM (Scott Daniels)writes:
>> C, however, requires
>> that providing too many arguments to a function not be a problem.
>Is this true, or just a fluke thing that works under many C implementations?
K&R (original) 4.3 (page 71, paragraph 4):
"It is generally safe to deal with a variable number of arguments
if the called function doesn't use an argument which was not actually
supplied, and if the types are consistent".
I take that as a constraint when writing a C compiler. Often there are more
efficient ways of passing parameters (such as callee cleans up stack), but
that is not "the C way".
-Scott Daniels daniels at teklds.UUCP or daniels at teklds.TEK.COM
More information about the Comp.lang.c
mailing list