CDECL Utility

"Jérôme M. Berger" jeberger at free.fr
Sat Dec 29 15:04:20 PST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jarrett Billingsley wrote:
>> 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.

	Seems like you need it...

> 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?

> void function(int) signal_function;
> 
> 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?

		Jerome
- --
+------------------------- Jerome M. BERGER ---------------------+
|    mailto:jeberger at free.fr      | ICQ:    238062172            |
|    http://jeberger.free.fr/     | Jabber: jeberger at jabber.fr   |
+---------------------------------+------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHdtJzd0kWM4JG3k8RAjaoAJ90SQ1ArQ2iWA25Jow3hBPr1mPGHwCfQR/s
IcZwai/g5Txsd/QHFCzcIw0=
=Eu7M
-----END PGP SIGNATURE-----


More information about the Digitalmars-d-learn mailing list