Function Ptr

BlitzMax Forums/BlitzMax Programming/Function Ptr

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.

BlitzMax doesn't allow you to explicitly cast from Byte Ptr to function - you need to do an implicit casting:
Global FuncPtr:Byte Ptr '= ...
Global Func:Int ( ) = Int ( ) FuncPtr
doesn't work.
Instead you can write:
Global FuncPtr:Byte Ptr '= ...
Global Func:Int ( ) = FuncPtr