program EmptyStringListExample;
uses
Classes; // TStringList
var
StringList: TStringList;
ListSize: Integer;
begin
// Create an empty TStringList
StringList := TStringList.Create;
// Get the size of the list (number of strings in it)
ListSize := StringList.Count;
// Output the size of the list
WriteLn('The size of the list is: ', ListSize);
// Free the TStringList to avoid memory leaks
StringList.Free;
end.
(*
run:
The size of the list is: 0
*)