Array of procedure as Parameter



Using Array of function in Parameters
Pas2JS pascal source code
function func : integer; begin Result:=123; end; procedure test(const aparams : Array Of function : integer); begin WriteLn(aparams[0]); end; procedure Hello; begin WriteLn('Hello'); end; function func2 : procedure; begin Result:=Hello; end; procedure test2(const aparams : Array Of function : procedure); begin aparams[0](); end; { unit1.pas } begin test([@func]); // 123 test2([@func2]); // Hello