view tests/code/function_pointer_3.d @ 188:b3e0729c8524

Extra test
author Anders Halager <halager@gmail.com>
date Fri, 25 Jul 2008 12:55:38 +0200
parents
children
line wrap: on
line source


int main()
{
    int function(int) f = &foo;
    return f(3);
}

int foo(int x)
{
    return x*x*x;
}