Pointers to procedure
Pointers to procedure
Is there any way of calling a procedure held in a variable pointer ?
Re: Pointers to procedure
You can use prototype for this:
Code: Select all
Procedure a(a.s)
Debug "a: " + a
EndProcedure
Procedure b(a.s)
Debug "b: " + a
EndProcedure
Prototype funcProto(a.s)
funcPointer.funcProto = @a()
funcPointer("Hello")
funcPointer = @b()
funcPointer("Hello")
Re: Pointers to procedure
Great! Thanks!