Подскажите пожалуйста почему выдаёт ошибку в кусочке
for i:=k+1 to n do
begin
(abs(a[i,k]))>max then begin
max:=abs(a[i,k]);
вот вся программа
program Metod_Gaussa_SLAU;
uses crt;
const
n=100;
eps=1E-10;
type
vector = array[1..n] of real;
matrica= array[1..n,1..n] of real; var
matr: matrica;
i,j : integer;
sv,neiz:vector;
PROCEDURE wwod(i,j:integer);
begin
for i:=1 to n do
begin
for j:=1 to n+1 do
write (matr[i,j],' ');
writeln;
end;
end;
procedure Gauss(a: matrica; n:integer; b:vector; var x:vector; max:real);
var k,l,i,j:integer;
c,s:real;
begin
for k:=1 to n-1 do
begin
max:=abs(a[k,k]); l:=k;
for i:=k+1 to n do
begin
(abs(a[i,k]))>max then begin
max:=abs(a[i,k]);
l:=i;
end;
end;
if l<>k then begin
for j:=k to n do
begin
c:=a[k,j]; a[k,j]:=a[l,j]; a[l,j]:=c;
end;
c:=b[k]; b[k]:=b[l]; b[l]:=c;
end;
for i:=k+1 to n do begin
for j:=k+1 to n do begin
a[i,j]:=a[i,j]-a[k,j]*a[i,k]/a[k,k];
end;
b[i]:=b[i]-b[k]*a[i,k]/a[k,k]; a[i,k]:=0;
end;
end;
x[n]:=b[n]/a[n,n];
for i:=n-1 to 1 do begin
s:=0;
for j:=i+1 to n do
s:=s+a[i,j]*x[j];
x[i]:=(b[i]-s)/a[i,i];
end;
end;
BEGIN
wwod(i,j);writeln;
Gauss(matr,n,sv,neiz);
for i:=1 to n do
writeln('x[n]=',' ');
readln;
End.
Заранее спасибо