Hash List

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Hash List

African Wild Dog
Hello,

Ia there any hash list implementation in free Pascal?

Ghashmap has no documentation. Is it stable for production use?


Regards

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hash List

silvioprog
On Fri, Mar 17, 2017 at 8:29 PM, African Wild Dog <[hidden email]> wrote:
Hello,

Ia there any hash list implementation in free Pascal?

Hello,

Please take a look at these examples:


and in this wiki page:

 
Ghashmap has no documentation. Is it stable for production use?


--
Silvio Clécio

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hash List

Giuliano Colla
In reply to this post by African Wild Dog
Il 18/03/2017 00:29, African Wild Dog ha scritto:

> Ia there any hash list implementation in free Pascal?
The IniFiles unit (fpc/packages/fcl-base/src/inifiles.pp) provides a
THashedStringList (descendant from TstringList) which I'm using reliably
since many years.

Giuliano
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hash List

African Wild Dog
Thanks for your reply Giuliano, Silvio.

To be more specific, i need a generic hash map similar to the Delphi's TDictionary.

It seems THashmap from the ghashmap unit is the most close to TDictionary.

Regards



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hash List

silvioprog
You're welcome. :-)

Notice the first link I've passed is exactly showing the TDictionary, recently added to FPC: https://github.com/graemeg/freepascal/blob/master/packages/rtl-generics/src/inc/generics.dictionariesh.inc#L534.

You should take a look at that. :-)

On Sat, Mar 18, 2017 at 12:54 AM, African Wild Dog <[hidden email]> wrote:
Thanks for your reply Giuliano, Silvio.

To be more specific, i need a generic hash map similar to the Delphi's TDictionary.

It seems THashmap from the ghashmap unit is the most close to TDictionary.

Regards

--
Silvio Clécio

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hash List

noreply
In reply to this post by Giuliano Colla
On 2017-03-17 19:06, Giuliano Colla wrote:
> Il 18/03/2017 00:29, African Wild Dog ha scritto:
>
>> Ia there any hash list implementation in free Pascal?
> The IniFiles unit (fpc/packages/fcl-base/src/inifiles.pp) provides a
> THashedStringList (descendant from TstringList) which I'm using
> reliably since many years.

If it is not specific to INI files and can be used generally for many
things, maybe it should be pulled out into some other unit so people do
not think it is just INI file related?

Also, ini files are file based, so could it be used without using files
on the disk and used as a in memory list only?
Any time someone sees "ini file" they think "files on the hard drive",
and could be turned off using this, when in fact it could be just what
they need.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hash List

Michael Van Canneyt


On Wed, 12 Apr 2017, [hidden email] wrote:

> On 2017-03-17 19:06, Giuliano Colla wrote:
>> Il 18/03/2017 00:29, African Wild Dog ha scritto:
>>
>>> Ia there any hash list implementation in free Pascal?
>> The IniFiles unit (fpc/packages/fcl-base/src/inifiles.pp) provides a
>> THashedStringList (descendant from TstringList) which I'm using
>> reliably since many years.
>
> If it is not specific to INI files and can be used generally for many
> things, maybe it should be pulled out into some other unit so people do
> not think it is just INI file related?

we could put it in contnrs, and alias it in inifiles.pp

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hash List

African Wild Dog
2017-04-12 10:57 GMT-03:00 Michael Van Canneyt <[hidden email]>:

we could put it in contnrs, and alias it in inifiles.pp


+1

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hash List

Graeme Geldenhuys-6
In reply to this post by noreply
On 2017-04-12 14:54, [hidden email] wrote:
> maybe it should be pulled out into some other unit so people do
> not think it is just INI file related?

Agreed!

G.


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hash List

Giuliano Colla
In reply to this post by Michael Van Canneyt
Il 12/04/2017 15:57, Michael Van Canneyt ha scritto:
> we could put it in contnrs, and alias it in inifiles.pp

+1

Giuliano


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Loading...