Вообще-то есть в модуле Math специальная функция:
function MaxValue(const Data: array of Double): Double;
Description
MaxValue returns the largest signed value in the Data array. In C++, the Data_Size parameter gives the index of the last element of the array (one less than the number of elements).
и проще всего воспользоваться ей.
Но можно отловить максимум на лету- по мере ввода данных в массив
Примерно так
Код:
var
MaxIndex, //указывает на максимальный элемент массива
i:integer;
A:array[0..100] of double; //массив
{--------------кнопка ввода данных из окна Edit1 в массив----------}
procedure TForm1.Button1Click(Sender: TObject);
begin
if i <=High(A) then
begin
A[i]:=StrToFloat(Edit1.Text);
if A[i] > A[MaxIndex] then MaxIndex:=i;
inc(i);
end
else
ShowMessage('массив заполнен');
end;
initialization
MaxIndex:=0;
i:=0;