= Variable Arguments = ''Part of'' StandardLibraryCategory == Description == Use std.c.stdarg for variable arguments. The std.c.stdarg module is now [http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=4490 obsolete] with the release of DMD 0.93. Use std.stdarg instead (see VariableArgumentsUsingStdStdargExample). == Example == {{{ #!d import std.c.stdarg; int foo(char *x, ...) { va_list ap; va_start!(typeof(x))(ap, x); printf("&x = %p, ap = %p\n", &x, ap); int i; i = va_arg!(typeof(i))(ap); printf("i = %d\n", i); long l; l = va_arg!(typeof(l))(ap); printf("l = %lld\n", l); uint k; k = va_arg!(typeof(k))(ap); printf("k = %u\n", k); va_end(ap); return i + l + k; } void main() { int j; j = foo("hello", 3, 23L, 4); printf("j = %d\n", j); assert(j == 30); } }}} == Source == Adapted from [http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=273 digitalmars.D/273].