CDECL Utility

jpl none at nospam.com
Sun Dec 30 11:50:46 PST 2007


Jarrett Billingsley Wrote:

> "jpl" <none at nospam.com> wrote in message 
> news:fl8ftn$25o8$1 at digitalmars.com...
> 
> >> 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?
> I think Jerome got it wrong too XD
> 
> "declare signal as function (int, pointer to function (int) returning void) 
> returning pointer to function (int) returning void" in D would be
> 
> alias void function(int) signal(int, void function(void));
                                                      
alias void function(int) signal(int, void function(int));

> Notice I used an alias and put signal in the middle, since the C is 
> declaring a *function* and not a *function pointer*.
> 
> 

And how would it be the declaration without the alias in D? 

Thanks



More information about the Digitalmars-d-learn mailing list