From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,14be6619f79b4573 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!news.tele.dk!not-for-mail Sender: malo@0x535ba172.boanxx18.adsl-dhcp.tele.dk Newsgroups: comp.lang.ada Subject: Re: Hashing on System.Address References: From: Mark Lorenzen Date: 13 Jun 2005 23:31:49 +0200 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: TDC Totalloesninger NNTP-Posting-Host: 83.91.161.114 X-Trace: 1118698310 dtext02.news.tele.dk 175 83.91.161.114:38123 X-Complaints-To: abuse@post.tele.dk Xref: g2news1.google.com comp.lang.ada:11323 Date: 2005-06-13T23:31:49+02:00 List-Id: Duncan Sands writes: > Does anyone have an efficient portable algorithm for hashing > on a System.Address? > > The Ada 2005 package Ada.Containers defines Hash_Type as > > type Hash_Type is mod implementation-defined; > > This is the target type I would like for the hash. > > Thanks a lot, > > Duncan. You can always convert a value of type System.Address to a value of a signed or modular (implementation-defined) type. That should help when you want to hash it into a value of type Hash_Type. - Mark Lorenzen