delphi 中给for自循环变量赋值
在delphi中怎样给for语句的自循环变量赋值,如以下VB代码for i=1 to 10i=i+1next在delphi中怎样实现上述语句
参考答案:delphi中循环变量不允许赋值
你可以用while语句完成这一做法
var
i:Integer;
begin
i:=1;
while i<=10 do Inc(i);
end;
在delphi中怎样给for语句的自循环变量赋值,如以下VB代码for i=1 to 10i=i+1next在delphi中怎样实现上述语句
参考答案:delphi中循环变量不允许赋值
你可以用while语句完成这一做法
var
i:Integer;
begin
i:=1;
while i<=10 do Inc(i);
end;