CDECL Utility

Jarrett Billingsley kb3ctd2 at yahoo.com
Sat Dec 29 17:17:47 PST 2007


""Jérôme M. Berger"" <jeberger at free.fr> wrote in message 
news:fl6jpl$1git$1 at digitalmars.com...

>> 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.
>>
> What's that "(int)" doing here? And would that even compile?

I was trying to convert the C declaration into D from the cdecl page.. I 
have no idea what the (int) is doing in _that_ decl, but it at least is not 
valid D :o

>> Pointer to a function that takes an int and returns a function.
>>
> Isn't it rather a pointer to a function that takes an int and
> returns void?

Typo :P 




More information about the Digitalmars-d-learn mailing list