From: Georg Bauhaus <bauhaus@arcor.de>
Subject: Re: How to use associative arrays in Ada 2005?
Date: Tue, 21 Nov 2006 12:49:26 +0100
Date: 2006-11-21T12:40:21+01:00 [thread overview]
Message-ID: <1164109766.13151.13.camel@localhost> (raw)
In-Reply-To: <1164103903.240838.37230@j44g2000cwa.googlegroups.com>
On Tue, 2006-11-21 at 02:11 -0800, snoopysalive wrote:
> So, when I say "hash", I mean something Perl-like like
> "$hashname{key1}{key2} = 'something' ". Or something C++-like like "map
> <string,int> hashname; hashname["key1"] = 42;".
With Ada 2005, you have Ada.Containers.Hashed_Maps;
hashname.insert("key1", 42);
See
http://en.wikibooks.org/wiki/Ada_Programming/Containers#First_Example:_Maps
for an example.
The original Ada.Containers distribution at
http://charles.tigris.org/
has a Containers tutorial linked at the bottom of the page.
> I found many Ada-tutorials but most of them just list
> the contents of the built-in packages and don't explain how to use
> them. As a beginner this is confusing.
Maybe try John English's
http://burks.bton.ac.uk/burks/language/ada/adacraft/contents.htm
It doesn't cover the Ada 2005 containers, though.
next prev parent reply other threads:[~2006-11-21 11:49 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-21 10:11 How to use associative arrays in Ada 2005? snoopysalive
2006-11-21 11:49 ` Georg Bauhaus [this message]
2006-11-21 14:18 ` Matthew Heaney
2006-11-21 23:35 ` snoopysalive
2006-11-23 19:27 ` snoopysalive
2006-11-23 19:40 ` Georg Bauhaus
2006-11-24 0:33 ` Georg Bauhaus
2006-11-24 11:49 ` Matthew Heaney
2006-11-24 8:27 ` Dmitry A. Kazakov
2006-11-24 11:51 ` Matthew Heaney
2006-11-26 19:05 ` snoopysalive
2006-11-26 20:30 ` Matthew Heaney
2006-11-27 9:15 ` Dmitry A. Kazakov
2006-11-27 19:53 ` Matthew Heaney
2006-11-27 21:11 ` Dmitry A. Kazakov
2006-11-27 21:52 ` Matthew Heaney
2006-11-28 8:29 ` Alex R. Mosteo
2006-11-28 13:19 ` Matthew Heaney
2006-11-28 8:34 ` Dmitry A. Kazakov
2006-11-28 13:21 ` Matthew Heaney
2006-11-27 21:08 ` Simon Wright
2006-11-27 22:22 ` Matthew Heaney
2006-11-27 22:58 ` Simon Wright
2006-11-28 1:55 ` Matthew Heaney
2006-11-24 11:35 ` Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox