Entry
Is there any sort of a mapping data type in Delphi?
Mar 2nd, 2000 17:29
Sean Blakey,
The closest thing I have found to a mapping data structure (like a Lisp
Property List or a Python Dictionary or a Perl Associative Array) is
the TStringList class. If you add string to this list in the form
"name=value" you can access the values through the "Values" property.
For example:
my_list := TStringList.Create();
my_list.Append("1=One");
my_list.Append("2=Two");
ShowMessage(my_list.Values["2"]);
Apparently this functionality was kludged in to ease the parsing
of .ini files.