delphi for 循环 to和downto的理解


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.

其实就是证明循环式从小到大还是从大到小

联系电话:
020-00000000
联系电话:
020-00000000
联系电话:
020-12345678