[fpc-pascal] how to pass a procedure address and execute it?

Ewald ewald at yellowcouch.org
Fri Jan 24 21:18:52 CET 2014


On 24 Jan 2014, at 21:20, waldo kitty wrote:

> On 1/23/2014 2:18 PM, waldo kitty wrote:
> 
> following up on this, how do i pass parameters to doThis and doThat?? do i have to use an intermediate pre_doThis and pre_doThat which handles the calls from centralControl and then calls doThis and doThat with the necessary parameters?
> 

Simply change the type:
	Type
		TProc = Procedure(aRecord: somerec);

Then you can call whichProc (in centralControl) with your argument of choice.


--
Ewald




More information about the fpc-pascal mailing list