comp.lang.ada
 help / color / mirror / Atom feed
From: rm@gunlab.com.ru (Roman V. Isaev)
Subject: Re: using charles library
Date: 26 May 2003 09:44:18 -0700
Date: 2003-05-26T16:44:18+00:00	[thread overview]
Message-ID: <d3ba4d4c.0305260844.1113a486@posting.google.com> (raw)
In-Reply-To: slrnbd46af.523.randhol+abuse@kiuk0152.chembio.ntnu.no

> > I'm learning the ropes, so it might be stupid question but I tried
> > use charles.maps.sorted.strings.unbounded (used sample code by 
> > mheaney@on2.com from this newsgroup archive):
> > with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
> > with Charles.Maps.Sorted.Strings.Unbounded;
> > with Charles.Strings.Unbounded; use Charles.Strings.Unbounded;
> > package body gettext is
> >    package Translation_Tables is
> >       new Charles.Maps.Sorted.Strings.Unbounded
> >         (Element_Type => Charles.Strings.Unbounded.Container_Type);
> >    TT : Translation_Tables.Container_Type;
> > ........
> >    procedure load_mo_file is
> > ........
> >          Insert(TT, "key", Element => To_Container("value"));
> Because it is:
>            Insert(TT, "key", New_Item => To_Container("value"));
> as I can see from the .ads file although I haven't tried to compile
> this.

   It still complains: 

gnatmake -gnatf gettext -I../charles
adagcc -c -gnatf -I../charles gettext.adb
gettext.adb:133:10: no candidate interpretations match the actuals:
gettext.adb:133:10: missing argument for parameter "Index" in call to
"insert" declared at charles-strings-unbounded.ads:180
gettext.adb:133:10: missing argument for parameter "Count" in call to
"insert" declared at charles-strings-unbounded.ads:159
gettext.adb:133:17: expected private type "unbounded.Container_Type"
defined at charles-strings-unbounded.ads:41
gettext.adb:133:17: found private type "test.Container_Type" defined
at charles-maps-sorted-strings-unbounded.ads:63, instance at line 12
gettext.adb:133:17:   ==> in call to "Insert" at
charles-strings-unbounded.ads:175
gettext.adb:133:17:   ==> in call to "Insert" at
charles-strings-unbounded.ads:170
gettext.adb:133:17:   ==> in call to "Insert" at
charles-strings-unbounded.ads:164
gettext.adb:133:17:   ==> in call to "Insert" at a-strunb.ads:274
gnatmake: "gettext.adb" compilation error

   I wonder is there any package easier to use? I only want two
functions, something like store(key,value) and lookup(key), that's
all, without 20+ string declaration voodoo... Grrrrr. I miss perl's
associative arrays.



  reply	other threads:[~2003-05-26 16:44 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-26 13:27 using charles library Roman V. Isaev
2003-05-26 13:40 ` Preben Randhol
2003-05-26 16:44   ` Roman V. Isaev [this message]
2003-05-26 17:05     ` Preben Randhol
2003-05-26 17:10       ` Preben Randhol
2003-05-26 22:05         ` Roman V. Isaev
2003-05-26 17:16     ` Jeffrey Carter
2003-05-27 15:05       ` Matthew Heaney
2003-05-27 18:28         ` Stephen Leake
2003-05-26 17:20     ` Preben Randhol
2003-05-26 22:46       ` Roman V. Isaev
2003-05-27  4:35         ` Gautier Write-only
2003-05-29 17:29           ` Roman V. Isaev
2003-05-29 18:56             ` Gautier Write-only
2003-05-29 23:19             ` Gautier Write-only
2003-05-30  7:56               ` Roman V. Isaev
2003-05-30 13:49                 ` Gautier
2003-05-30 14:36               ` Robert C. Leif
2003-05-30 17:32                 ` Preben Randhol
2003-05-30 19:21               ` Randy Brukardt
2003-05-31 11:50                 ` Gautier Write-only
2003-05-31 14:24                   ` Bill Findlay
2003-06-01  3:42                   ` Randy Brukardt
2003-06-02 11:02                   ` Georg Bauhaus
2003-06-02 20:25                     ` Gautier Write-only
2003-05-30  8:48             ` Preben Randhol
2003-05-27 10:31         ` Preben Randhol
2003-05-29 20:30           ` Roman V. Isaev
2003-05-30  9:01             ` Preben Randhol
2003-05-30 22:02               ` Roman V. Isaev
2003-05-31 13:34                 ` Preben Randhol
2003-05-27 18:27     ` Stephen Leake
2003-05-27 20:24 ` 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