What happened to _argptr ?
Tomas Lindquist Olsen
tomas at famolsen.dk
Wed Feb 7 08:17:05 PST 2007
jcc7 wrote:
> == Quote from Tomas Lindquist Olsen (tomas at famolsen.dk)'s article
>> 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?
>
> I couldn't get your code to work either, but the following code seems to
> work (tested with DMD 1.0):
>
> import std.stdio;
>
> void foo(...)
> {
> writefln("\t%s", _argptr);
> }
>
>
> void main()
> {
> foo(1, 2, 3L, 4.5, 7F, "my str");
> }
>
>
> A longer example is at:
>
http://www.dsource.org/projects/tutorials/wiki/VariableArgumentsUsingStdStdargExample
This is clearly a bug, so I filed it:
http://d.puremagic.com/issues/show_bug.cgi?id=937
More information about the Digitalmars-d
mailing list