pascalabcnet/TestSuite/units/u_delegates4.pas
Бондарев Иван e6e67c193c initial commit
2015-05-14 21:35:07 +02:00

20 lines
318 B
ObjectPascal

unit u_delegates4;
type TFunc = function(i: integer):integer;
function f1(i : integer) : integer;
begin
Result := i;
end;
function f2(i : integer) : integer;
begin
Result := i;
end;
const arr : TFunc = f1;
arr2 : array[1..3] of TFunc = (f1,f2,f1);
begin
assert(arr(3)=3);
assert(arr2[2](2)=2);
end.