From: Gautier <gautier@fakeaddress.nil>
Subject: Re: Dynamic allocation of named arrays
Date: Tue, 29 Apr 2008 22:14:15 +0200
Date: 2008-04-29T22:14:15+02:00 [thread overview]
Message-ID: <48178189$1_3@news.bluewin.ch> (raw)
In-Reply-To: <87abjdm3da.fsf@T40.i-did-not-set--mail-host-address--so-tickle-me>
Kim Rostgaard Christensen wrote:
> Hello
>
> I need an array that has both variable length key and value (strings)
> that is dynamically allocated at run-time.
>
> I have looked at ada05's "Containers.Hashed_maps" but am missing a good
> example on usage
with Ada.Strings.Unbounded.Hash;
...
package Dictionaries is new Ada.Containers.Hashed_Maps
(Ada.Strings.Unbounded.Unbounded_String,
Ada.Strings.Unbounded.Unbounded_String,
Ada.Strings.Unbounded.Hash,
equivalent_keys => Ada.Strings.Unbounded."=");
For a full example, search "Texture_Name_Mapping" in:
http://globe3d.svn.sourceforge.net/viewvc/globe3d/src/globe_3d-textures.adb?revision=78&view=markup
> , and would like to use something more portable.
Well, how can it be more portable ?!...
Do you mean with some Ada 95 compilers ?
______________________________________________________________
Gautier -- http://www.mysunrise.ch/users/gdm/index.htm
Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm
NB: For a direct answer, e-mail address on the Web site!
next prev parent reply other threads:[~2008-04-29 20:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 9:12 Dynamic allocation of named arrays Kim Rostgaard Christensen
2008-04-29 9:55 ` Thomas Locke
2008-04-29 18:37 ` DScott
2008-04-29 19:38 ` Simon Wright
2008-04-29 20:14 ` Gautier [this message]
2008-04-29 20:59 ` Gautier
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox