type
TCalc = class
public
//callable without an instance
class function GetMin(
const Values: array of Integer): Integer;
end;
class function TCalc.GetMin(
const Values: array of Integer): Integer;
var
I: Integer;
begin
if Length(Values) = 0 then
Exit(0);
Result := Values[0];
for I := 1 to High(Values) do
if Values[I] < Result then
Result := Values[I];
end;
var
Min: Integer;
begin
Min := TCalc.GetMin([3, 2, 5, 1, 4]);
//min is 1
WriteLn('min is ', Min);
end.