procedure TForm1.Button1Click(Sender: TObject);
var
x:integer; //定义一个变量
begin
for x:=1 to 10 do //执行for语句 给x赋值从 1 to 10 然后do执行begin中语句 从10到一 使用 downto语句 替换to
begin
showmessage (inttostr(x)); //以showmessage模式 输出 x 共10次
end;
end;
end.