谁能告诉我这道DELPHI的题目错在哪里???

来源:百度知道 编辑:UC知道 时间:2024/06/23 14:11:27
a:=3;b:=6;
for i:=a to b do
begin
a:=1;b:=5;
showmessage(inttostr(i));
if i>b-a then i:=i-1;
end

for i:=a to b do
begin
a:=1;b:=5;
showmessage(inttostr(i));
if i>b-a then i:=i-1;
end
在循环中再给循环变量赋值,这样进入死循环,没有跳出命令不会执行别的指令

在循环中不能设置循环变量I的值。

可能是一个死循环