DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Complying with standard C

Functions with varying arguments

In previous implementations, you could not specify the parameter types that a function expected, but ANSI C allows you to use prototypes to do this. In order to support functions such as printf, the syntax for prototypes includes a special ellipsis (...) terminator. Because an implementation might be required to do unusual things to handle a varying number of arguments, ANSI C requires that all declarations and the definition of such a function include the ellipsis terminator.

Since there are no names for the ``...'' part of the parameters, a special set of macros contained in stdarg.h gives the function access to these arguments. Earlier versions of such functions had to use similar macros contained in varargs.h.


Next topic: Example
Previous topic: Examples

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004