Translation of C function pointer.

Steven Schveighoffer schveiguy at yahoo.com
Thu Sep 16 07:37:59 PDT 2010


On Thu, 16 Sep 2010 10:06:24 -0400, BCS <none at anon.com> wrote:

> Hello Steven,
>
>> // note you can't use void as a parameter type in D
>> void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(/*void*/);
>> pragma(msg, typeof(xDlSym).stringof);
>> outputs:
>>  void function() function(sqlite3_vfs*, void*, const const(char*)
>> zSymbol)
>
> D, now with C type un-garbleing!

I'd have to say, if I wasn't able to use D to do this, it would have taken  
me hours to figure this one out.  Even knowing what it is now, I still  
can't read it :)

D is a huge leap ahead of C in this regard!

-Steve


More information about the Digitalmars-d-learn mailing list