Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Re: Dynamic all...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 6 Topic 5674 of 5831
Post > Topic >>

Re: Dynamic allocation of named arrays

by Gautier <gautier@[EMAIL PROTECTED] > Apr 29, 2008 at 10:14 PM

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 ****table.

Well, how can it be more ****table ?!...
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!
 




 6 Posts in Topic:
Dynamic allocation of named arrays
Kim Rostgaard Christensen  2008-04-29 11:12:17 
Re: Dynamic allocation of named arrays
Thomas Locke <thomas@[  2008-04-29 11:55:04 
Re: Dynamic allocation of named arrays
DScott <Merlin43PhD@[E  2008-04-29 13:37:12 
Re: Dynamic allocation of named arrays
Simon Wright <simon.j.  2008-04-29 20:38:01 
Re: Dynamic allocation of named arrays
Gautier <gautier@[EMAI  2008-04-29 22:14:15 
Re: Dynamic allocation of named arrays
Gautier <gautier@[EMAI  2008-04-29 22:59:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 20:52:37 CDT 2008.