Calling a function pointer stored as a structure field?
Posted: Fri Dec 13, 2024 5:26 am
I have a structure that stores a callback pointer on it, but I can't figure out how to actually call it. This seems like something that should be trivial, but including the parens says garbage at the end of the line. Removing them says syntax error.
Code: Select all
EnableExplicit
Structure Test
Name.s
*Callback
EndStructure
Procedure TestProc()
MessageRequester("This is a", "Test")
EndProcedure
Global T.Test
t\Name = "Test"
T\Callback = @TestProc()
T\Callback()