From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,74d953d10520ed5e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-26 09:44:19 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: rm@gunlab.com.ru (Roman V. Isaev) Newsgroups: comp.lang.ada Subject: Re: using charles library Date: 26 May 2003 09:44:18 -0700 Organization: http://groups.google.com/ Message-ID: References: NNTP-Posting-Host: 195.151.20.194 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1053967458 18068 127.0.0.1 (26 May 2003 16:44:18 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 26 May 2003 16:44:18 GMT Xref: archiver1.google.com comp.lang.ada:37799 Date: 2003-05-26T16:44:18+00:00 List-Id: > > 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.