求救~!!!!!!!!!!!!!!循环问题
function R1equR :boolean;var i,j,t1,t2:integer;
begin
for i:=1 to n do
for j:=1 to n do
begin
if rr[i,j]<>r[i,j] then r[i,j]:=rr[i,j]
else R1equR:=true;
end;
end;
求救:下列运行会出现死循环,请高手帮我看看问题在哪?
谢谢!!!!!!!!!!!!!!!!!!!r矩阵是33阶的
begin
if RadioButton45.Checked then //传递闭包法
begin
for i:=1 to n do
begin
R[i,i]:=1; //修正错误
end;
js0:=0;
while js0=1 do //求传递闭包
begin
for i:=1 to n do
for j:=1 to n do
begin
rr[i,j]:=0;
temp:=0;
for k:=1 to n do
begin
if r[i,k]<r[k,j]
then temp:=r[i,k]
else temp:=r[k,j];
if rr[i,j]<temp
then rr[i,j]:=temp;
end;
js0:=js0+1;
end;
if r1equr then break; //跳出WHIEL 循环
end;