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

Jim Leonard trixter at oldskool.org
Thu Jan 23 20:32:19 CET 2014


On 1/23/2014 1:27 PM, Marco van de Voort wrote:
> Define a procedure type that matches both procedures, in your example
>
> Type
>    TProc = procedure ; // which is predefined in system afaik.
>
> and change whichproc to that type. The VAR is not necessary in this case.

Alternately, switch to an OOP model, whose entire model (inheritance) 
addresses this sort of thing.
-- 
Jim Leonard (trixter at oldskool.org)
Check out some trippy MindCandy: http://www.mindcandydvd.com/
A child borne of the home computer wars: http://trixter.oldskool.org/
You're all insane and trying to steal my magic bag!



More information about the fpc-pascal mailing list