Callback?

BlitzMax Forums/BlitzMax Beginners Area/Callback?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Yes
Function TEST:string(x:int)
Notify x
EndFunction 

Local MyFunc:string(var:int) 'CALLBACK function
MyFunc = TEST
MyFunc(0) 'diplay message


2nd example
Function RepeatMe(myFunc(x:int))
myFunc(0) 'diplay message
myFunc(1) 'diplay message
myFunc(2) 'diplay message
EndFunction 

Function TEST(x:int)
Notify x
EndFunction 

RepeatMe(TEST)