variadic args

Jarrett Billingsley kb3ctd2 at
Fri Dec 8 14:40:10 PST 2006

"novice2" <sorry at noem.ail> wrote in message 
news:elbedj$2t21$1 at
> thanks for all replies!
> resume: basically nothing changed yet,
> no language support for this (yet?).

Nope.  Though the "standard" method to do this, kind of carried over from C, 
is to have a 'v' version of each function, and then a truly variadic version 
which just calls the 'v' version.  In this way you can pass the variadic 
args to the other 'v' functions.

void vFoo(TypeInfo[] arguments, va_list argptr)
    // do the actual body of the function here
    vBar(arguments, argptr);

void foo(...)
    vFoo(_arguments, _argptr);

void vBar(TypeInfo[] arguments, va_list argptr)


void bar(...)
    vBar(_arguments, _argptr);

More information about the Digitalmars-d-learn mailing list