How to know whether to use function or delegate

Lionello Lunesu lio at lunesu.remove.com
Tue Jul 18 04:26:46 PDT 2006


Reiner Pope wrote:
> Thanks for the response. I thought that was the case, but I didn't 
> really see why functions would really be in the spec in that case.

For extern (C) functions that only want a function pointer, like qsort's 
int (*compare)(void*,void*)

L.

Notice that you can easily wrap a function to pass it as a delegate, 
using the new function literal syntax. There's another post in this 
group explaining it in more detail.



More information about the Digitalmars-d-learn mailing list