I have this piece of code:
Code: Select all
Prototype myProto(arg1.s, arg2)
Global myFunctionPtr.myProto
Procedure test_a(arg1.s, arg2)
Debug arg1 + " = " + Str(arg2)
EndProcedure
Procedure test_b(arg1.s, arg2)
Debug arg1 + " ==> " + Str(arg2)
EndProcedure
myFunctionPtr = @test_a()
myFunctionPtr("ok",1)
Something like this: genericFunction( @test_a(), "ok", 1)
genericFunction() will indirectly call test_a() once implemented...
It should not be to hard to do this (Windows API uses callback functions all the time), but I simply can't figure out how.