Logo

Programming-Idioms

History of Idiom 134 > diff from v23 to v24

Edit summary for version 24 by Bart:
New Pascal implementation by user [Bart]

Version 23

2018-08-18, 22:07:08

Version 24

2018-08-19, 16:44:49

Idiom #134 Create a new list

Declare and initialize a new list items, containing 3 elements a, b, c.

Idiom #134 Create a new list

Declare and initialize a new list items, containing 3 elements a, b, c.

Extra Keywords
array vector slice tuple
Extra Keywords
array vector slice tuple
Imports
classes
Code
var
  Items: TList;
  a,b,c: pointer;
begin
  Items := TList.Create;
  Items.Add(a);
  Items.Add(b);
  Items.Add(c);
end.
Comments bubble
Note that in the example a,b, and c don't hold any meaninfull data.