CDECL Utility

jpl none at nospam.com
Sun Dec 30 08:10:31 PST 2007


Jérôme M. Berger Wrote:

> cdecl> explain void (*signal(int, void (*)(int)))(int);
> declare signal as function (int, pointer to function (int) returning
> void) returning pointer to function (int) returning void
> 
> 	So I think that the proper D declaration would be:
> void function (int sig, void function (int)) function (int) signal;


Then the pointers to functions in D are not read from right to left? 
In your example I understand: pointer to function(int) that returns a pointer to function(int sig, pointer to function(int) returning void) that returns void. 

I have no problems to understand any declaration in C but I don't get the D style... 




More information about the Digitalmars-d-learn mailing list