CallFunction() for Callback systems
Posted: Tue Feb 25, 2014 9:52 pm
Little tricks to execute a procedure with its "pointer"
Although, the SpiderBasic.js need to be cleaned from asm code.
Code: Select all
;/**
; * Execute and return the @Procedure() passing parms object as parameter
; */
Procedure CallFunction(*proc, *parms)
!if (p_proc!= null) return p_proc(p_parms);
EndProcedure
Procedure TestCall(value.s)
Debug value
ProcedureReturn #True
EndProcedure
Debug CallFunction(@TestCall(), @"lalala")