What happened to _argptr ?

Bill Baxter dnewsgroup at billbaxter.com
Wed Feb 7 15:47:34 PST 2007


Tomas Lindquist Olsen wrote:
> I'm trying to compile a pretty simple C-style variadic function.
> 
> extern(C)
> void error(char* fmt, ...)
> {
>         vprintf(fmt, _argptr);
> }
> 
> This gives the error:
> Error: undefined identifier _argptr
> 
> According to http://digitalmars.com/d/function.html this should at least
> compile.
> 
> Whats up?

<rant mode="feel free to ignore>
Ugh, I wish _argptr/_arguments would go away completely.
There has to be a better way to handle variable numbers of arguments ... 
oh wait! there is!  You specify a *name* for the argument list, kinda 
like how the other variadic arguments work in D, the ones for templates.

_argptr/_arguments just look like a quick hack.  By far the most hackish 
looking thing in all of D.
</rant>

--bb



More information about the Digitalmars-d mailing list