например так function p5(x: array of double): double; begin result:=0/0; if length(x)<>5 then exit; result:=x[0]; if x[1]>result then result:=x[1]; if x[2]>result then result:=x[2]; if x[3]>result then result:=x[3]; if x[4]>result then result:=x[4]; end; /// пример вызова p5([3,-70,1,8.1,4.4])