CDECL Utility

Jarrett Billingsley kb3ctd2 at yahoo.com
Sat Dec 29 11:56:45 PST 2007


"jpl" <none at nospam.com> wrote in message 
news:fl67kd$peu$1 at digitalmars.com...
> Hi,
>
> Is there any utility in D like the CDECL for C?
>
> http://www.cs.vassar.edu/cgi-bin/man2html?cdecl+1
>
> Regards

With D's simple declaration syntax, is it necessary?  Just read 
right-to-left.

char* s;

Pointer to char.

void function(int sig, void function(int))(int) signal;

Pointer to a function that takes (an int and a (pointer to a function that 
takes an int and returns void)) and returns void.

void function(int) signal_function;

Pointer to a function that takes an int and returns a function.

int[][int delegate(char[])] aa;

Associative arrays that maps from (delegates that take a char[] and return 
an int) to arrays of ints. 




More information about the Digitalmars-d-learn mailing list