Function Pointer property alias |
Smart pascal source code
type TEvent = procedure(s: String); type TMyEvent = TEvent; var e: TEvent; var m: TMyEvent; procedure Test(s: String); begin WriteLn(s); end; e := Test; e('alpha'); m := e; m('beta'); e := m; e('gamma'); {<<< RESULT - CONSOLE LOG >>> ----------------------------- alpha beta gamma ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}