📄 testinitfinal.out
字号:
unit TestInitFinal;
{ AFS 1 March 2K
This unit compiles but is not semantically meaningfull
it is test cases for the code formatting utility
This unit tests layout of the code in the init and final section
}
interface
var
SomeGlobalSeed: integer;
Fred: TObject;
implementation
uses Classes, SysUtils;
function RandomInt: integer;
begin
Result := Random(1000);
end;
initialization
SomeGlobalSeed := RandomInt;
if SomeGlobalSeed > 20 then
begin
while SomeGlobalSeed > 20 do
begin
SomeGlobalSeed := SomeGlobalSeed - RandomInt div 100;
end;
end;
fred := TList.Create;
finalization
while RandomInt < 20000 do
begin
FreeAndNil(Fred);
SomeGlobalSeed := 0;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -