langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
19
Task/Collections/Pascal/collections-6.pascal
Normal file
19
Task/Collections/Pascal/collections-6.pascal
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
program ListDemo;
|
||||
uses
|
||||
classes;
|
||||
var
|
||||
MyList: TList;
|
||||
a, b, c: integer;
|
||||
i: integer;
|
||||
begin
|
||||
a := 1;
|
||||
b := 2;
|
||||
c := 3;
|
||||
MyList := TList.Create;
|
||||
MyList.Add(@a);
|
||||
MyList.Add(@c);
|
||||
MyList.Insert(1, @b);
|
||||
for i := MyList.IndexOf(MyList.First) to MyList.IndexOf(MyList.Last) do
|
||||
writeln (integer(MyList.Items[i]^));
|
||||
MyList.Destroy;
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue