program Project8 APPTYPE CONSOLE uses SysUtils Generics Collections ty

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
program Project8;
{$APPTYPE CONSOLE}
uses
SysUtils, Generics.Collections;
type t=record
a,b: integer;
end;
var lst:TList<t>;
tt:t;
begin
try
lst:=TList<t>.Create;
tt.a:=0;
tt.b:=0;
lst.Add(tt);
lst.Delete(0);
except
on E:Exception do
Writeln(E.Classname, ': ', E.Message);
end;
readln
end.