$J相当于C里面的static类型
procedure TForm1.Button1Click(Sender: TObject);
const
{$J+}
i: integer = 0;
{$J-}
begin
ShowMessage(IntToStr(i));
Inc(i);
end;
const
{$J+}
i: integer = 0;
{$J-}
begin
ShowMessage(IntToStr(i));
Inc(i);
end;
$J相当于C里面的static类型
转载于:https://www.cnblogs.com/Jekhn/archive/2010/12/28/1918515.html