Function Pointer params



Function Pointer param
Smart pascal source code
type TMyFunc = function(i: Integer): String; procedure Func1(f: TMyFunc); begin WriteLn('Func1'); WriteLn(f(123)); end; procedure Func2(f: TMyFunc); begin WriteLn('Func2'); Func1(f); end; Func2(IntToStr); {<<< RESULT - CONSOLE LOG >>> ----------------------------- Func2 Func1 123 ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}