for in Array of TProcedure |
Smart pascal source code
Type TProc = Procedure; procedure Hello; begin WriteLn('Hello'); end; procedure World; begin WriteLn('World'); end; { main.pas } procedure TApplication.RunApp; var arr: Array Of TProc; proc: TProc; Begin arr.Add(Hello); arr.Add(World); arr.Add(World); arr.Add(Hello); For proc In arr Do proc; { <<< CONSOLE OUTPUTS >>> Hello World World Hello }