Address of a Function
BlitzMax Forums/BlitzMax Programming/Address of a Function
| ||
Any one can explain me how to get an address of a function?. |
| ||
SuperStrict Framework BRL.Blitz Local Pointer:Byte Ptr Pointer = MyFunction WriteStdout("Address: " + Int(Pointer)) End Function MyFunction:Int(X:Int, Y:Int) Return X + Y End Function |
| ||
hi,thanks. But u have used BRL.Blitz framework. I have removed that line and checked. But its giving some other address/Garbage values i don't know. Is it possible to get the address without use of framework. |
| ||
Thanks a lot Can we call the function using that pointer |
| ||
oO BRL.Blitz is normaly linked with all applications. I use it only to reduce compile times becouse without a framework all Pub and BRL modules will be linked. So I bind BRL.Blitz and have no other overhead. cu olli |
| ||
to make a function pointer define a variable as a function:global FPointer() FPointer = MyFunction Fpointer() function MyFunction() print "Called!" end function |
| ||
for call to funtion use: local func1:int(x:int, y:int)=pointer call the func1 standar way result=func1(valx, valy) Bye, Paposo |
| ||
ya thank u. |