On Thu, Jun 16, 2011 at 6:07 AM, Kagamin <[email protected]> wrote:

> Walter Bright Wrote:
>
> > http://drdobbs.com/blogs/tools/230700070
>
> import std.stdio;
>
> int square_debug(int x)
> {
>    writefln("square(%d)", x);
>    return x * x;
> }
>
> pure alias int function(int) fp_t;
>
> pure int square(int x)
> {
>    auto fp = cast(fp_t)&square_debug;
>    return (*fp)(x); // dereference???
> }
>

Yes, that's correct.

Reply via email to