pascalabcnet/TestSuite/overloads8.pas
Бондарев Иван 2026576845 temp fix #919
2018-08-06 12:54:40 +02:00

19 lines
269 B
ObjectPascal

type Point = auto class
x,y: integer;
end;
var i := 1;
function RandomPoint: Point;
begin
Result := new Point(i, i);
Inc(i);
end;
var a: array of Point;
begin
a := ArrGen(10,i->RandomPoint);
assert(a.Min(p->p.x) = 1);
assert(a.Max(p->p.x) = 10);
end.