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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,693e247f5dca709d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!l12g2000cwl.googlegroups.com!not-for-mail From: "snoopysalive" Newsgroups: comp.lang.ada Subject: Re: How to use associative arrays in Ada 2005? Date: 23 Nov 2006 11:27:31 -0800 Organization: http://groups.google.com Message-ID: <1164310051.811802.237400@l12g2000cwl.googlegroups.com> References: <1164103903.240838.37230@j44g2000cwa.googlegroups.com> <1164152113.623461.130190@e3g2000cwe.googlegroups.com> NNTP-Posting-Host: 217.227.46.137 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1164310055 1107 127.0.0.1 (23 Nov 2006 19:27:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 23 Nov 2006 19:27:35 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.02 (Macintosh; PPC Mac OS X; U; de),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: l12g2000cwl.googlegroups.com; posting-host=217.227.46.137; posting-account=1NtCpw0AAACqUfB6fMELOcl42bUe9ocw Xref: g2news2.google.com comp.lang.ada:7668 Date: 2006-11-23T11:27:31-08:00 List-Id: Hi! First: @Matt: Thank you for the pdf. It's really useful, but I couldn't write you back because of the email filter. And now, my next question: How to handle "hashes of hashes" in Ada? Here's the code which should contain a package representing a hash of a hash: -- Here, the code begins with Ada.Text_IO, Ada.Strings.Hash, Ada.Containers.Indefinite_Hashed_Maps; use Ada.Text_IO, Ada.Strings, Ada.Containers; procedure book is package Str_Int_Maps is new Ada.Containers.Indefinite_Hashed_Maps (String, Integer, Ada.Strings.Hash, "="); use Str_Int_Maps; package Str_Map_Maps is new Ada.Containers.Indefinite_Hashed_Maps (String, Str_Int_Maps.Map, Ada.Strings.Hash, "="); Ages : Str_Map_Maps.Map; -- That's the "hash of a hash" begin Ages.Insert("family name",Insert("name",23)); end book; -- Here, the code ends The statement "Ages.Insert("family name",Insert("name",23));" doesn't work. So, how is it possible to do something like this in C++: "... map> ages; ages["family name"]["name"] = 23; ..." Thank you and greetings, Matthias