实例7 for循环

  for循环是最常用的循环,它适用于重复次数比较确定的情况,主要有两种典型的用法。

for ... to do法:

var  ii:Integer;

for ii:=1 to 100 do

begin

  处理语句;

end;

for ... downto do法:

for ii:=100 downto 1 do

begin

  处理语句;

end;

 

posted on 2022-02-25 23:52  Delphi搬运工  阅读(147)  评论(0)    收藏  举报