[fpc-announce] Free Pascal Contributed units modified entry. (Associative arrays)

contribs at freepascal.org contribs at freepascal.org
Tue Jan 9 15:40:28 CET 2007


The following entry in the Free Pascal contributed units was modified:

Name         : Associative arrays
Author       : Bidok aka Szkuwa
Email        : szkuwa at o2.pl
Homepage     : http://4programmers.net/Delphi/Artykuły/Tablice_asocjacyjne
FTP site     : http://4programmers.net/bin/assoca.zip
Version      : 1.4
Date         : 2007-01-09
Category     : Miscellaneous
Supported OS : Win32 and Linux, other (?)
Description  :
Special class that alow you to use associative arrays in FPC (work also in Delphi with small modification)<br>
<br>
Features:<br>
* multidimensional<br>
* auto grow when needed<br>
* auto free children when parent is destroyed<br>
* no need to specify array size when creating<br>
* fast<br>
* flexible<br>
* one key => as many values as you wish ^^<br>
* not based on TStringList class<br>
* special functions like ForEach and ForEachLevel<br>
* you can write your own classes based on TCustomAssocArray<br>
<br>
Sample code:<br>
var<br>
&nbsp;&nbsp;Tab: TAssocStr;<br>
begin<br>
&nbsp;&nbsp;Tab := TAssocStr.Create;<br>
&nbsp;&nbsp;Tab['key1'].Value := 'some value 1';<br>
&nbsp;&nbsp;Tab['key2']['sub key']['sub sub key'].Value := 'another value';<br>
&nbsp;&nbsp;Tab.Free;<br>
end;<br>
<br>
There is simple tutorial online under "home page" url (at this time in polish only..)<br>




More information about the fpc-announce mailing list