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

Reply via email to