delphi for 循环 to和downto的理解
procedure TForm1.btn1Click(Sender: TObject);
var
c:Integer;
begin
for c:=5 downto 0 do
begin
ShowMessage(IntToStr(c));
end;
end;
for c:=0 to 5 do
begin
ShowMessage(IntToStr(c));
end;
end;
end.
其实就是证明循环式从小到大还是从大到小
好的代码像粥一样,都是用时间熬出来的