Re: How to use associative arrays in Ada 2005?



"snoopysalive" <matthias.kistler@xxxxxx> writes:

Sadly, Matt's solution didn't work. The statement "Ages.Insert ("family
name", C, B);" brought a compilation error: "no selector 'Insert' for
private type "Ada.Containers.Indefinite_Hashed_Maps.Map" from instance
at line 16". I found out that no procedure "Insert(String, Cursor,
Boolean)" exists. But it exists a procedure "Insert(String,
Element_Type, Cursor, Boolean)".

Yes, you're right. I was thinking of the definite form of the hashed map. The
indefinite form doesn't include the operation I used in my example. Sorry for
the confusion.


So, I'm trying to combine Matt's and Georg's ideas now. I'll write a
line, if I'd be successfull. Otherwise, I'll also write a line. ;-)

Right, all you need to do is change my example to say:

Ages.Insert
(Key => "family name",
New_Item => Str_Int_Maps.Empty_Map,
Position => C,
Inserted => B);

.



Relevant Pages

  • Re: Open some dialog boxes and the mouse cursor moves to one of the di
    ... SetCursorPos is actually Boolean, not Long. ... > Private Sub Form1_Load(ByVal sender As System.Object, ... >> cursor and move it. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Blocking mouse clicks
    ... Consider disabling the appropriate controls, dialog, window, or setting a ... boolean / using the handle to your lengthy thread to determine if it is ... I want to change the cursor to a WaitCursor. ...
    (microsoft.public.vc.mfc)