Article View: borland.public.delphi.language.objectpascal
Article #10How to use an integer as a hash key?
From: Malte Persike
Date: Mon, 19 Apr 2004 10:29
Date: Mon, 19 Apr 2004 10:29
24 lines
1701 bytes
1701 bytes
Hi! I need a hashed list in one of my visual components. As I am not very much into the logic behing hashing and hashing functions, I decided to modify the code given in Delphi's THashedStringList. Only problem is that this list is designed as the usual string-string hash whereas I need an int-object hash (int as key, object as value). To my understanding all a hash function does is to take a string (usually) and return a most probably unique integer number. Would it be considered ok if I just altered the Delphi code in the way that the HashOf() function returns just the integer value it received as a hash key? Kind regards, Malte -- The above e-mail address is not valid. To contact me, please use my real e-mail address: malte AT t DASH online DOT de
Technical Details
Message-ID:
<15878013fm2qhlj99077cdb98gk0bjd94a@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news.ntli.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!pd95ff4f0.dip.t-dialin.NET!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109d30,c7e2c0f21a5ff7ac,start X-Google-Attributes: gid109d30,public X-Google-ArrivalTime: 2004-04-19 03:29:49 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news.ntli.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!pd95ff4f0.dip.t-dialin.NET!not-for-mail From: Malte Persike <me@privacy.net> Newsgroups: borland.public.delphi.language.objectpascal Subject: How to use an integer as a hash key? Date: Mon, 19 Apr 2004 12:29:04 +0200 Lines: 24 Message-ID: <15878013fm2qhlj99077cdb98gk0bjd94a@4ax.com> NNTP-Posting-Host: pd95ff4f0.dip.t-dialin.net (217.95.244.240) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1082370587 6813782 I 217.95.244.240 ([212227]) X-Newsreader: Forte Free Agent 1.93/32.576 English (American)