1<html lang="en"> 2<head> 3<title>Arglists - Untitled</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Untitled"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="prev" href="Syscalls.html#Syscalls" title="Syscalls"> 9<link rel="next" href="Library-Index.html#Library-Index" title="Library Index"> 10<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 11<meta http-equiv="Content-Style-Type" content="text/css"> 12<style type="text/css"><!-- 13 pre.display { font-family:inherit } 14 pre.format { font-family:inherit } 15 pre.smalldisplay { font-family:inherit; font-size:smaller } 16 pre.smallformat { font-family:inherit; font-size:smaller } 17 pre.smallexample { font-size:smaller } 18 pre.smalllisp { font-size:smaller } 19 span.sc { font-variant:small-caps } 20 span.roman { font-family:serif; font-weight:normal; } 21 span.sansserif { font-family:sans-serif; font-weight:normal; } 22--></style> 23<link rel="stylesheet" type="text/css" href="../cs.css"> 24</head> 25<body> 26<div class="node"> 27<a name="Arglists"></a> 28<p> 29Next: <a rel="next" accesskey="n" href="Library-Index.html#Library-Index">Library Index</a>, 30Previous: <a rel="previous" accesskey="p" href="Syscalls.html#Syscalls">Syscalls</a>, 31Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a> 32<hr> 33</div> 34 35<h2 class="chapter">13 Variable Argument Lists</h2> 36 37<p>The <code>printf</code> family of functions is defined to accept a variable 38number of arguments, rather than a fixed argument list. You can define 39your own functions with a variable argument list, by using macro 40definitions from either <samp><span class="file">stdarg.h</span></samp> (for compatibility with ANSI C) 41or from <samp><span class="file">varargs.h</span></samp> (for compatibility with a popular convention 42prior to ANSI C). 43 44<ul class="menu"> 45<li><a accesskey="1" href="Stdarg.html#Stdarg">Stdarg</a> 46<li><a accesskey="2" href="Varargs.html#Varargs">Varargs</a> 47</ul> 48 49 </body></html> 50 51