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 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 10:10:21 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!newsfeed.stueberl.de!newsfeed.vmunix.org!feed.news.nacamar.de!uio.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: using charles library Date: Mon, 26 May 2003 17:10:20 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: NNTP-Posting-Host: kiuk0152.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1053969020 28690 129.241.83.78 (26 May 2003 17:10:20 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Mon, 26 May 2003 17:10:20 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:37803 Date: 2003-05-26T17:10:20+00:00 List-Id: Preben Randhol wrote: > Roman V. Isaev wrote: >>> > 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: > > Ah because you have to do: > > Charles.Maps.Sorted.Strings.Unbounded.Insert > (TT, "key", New_Item => To_Container("value")); Ooops sorry forget what I said my fault: Should be: 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 Translation_Tables.Insert(TT, "key", New_Item => To_Container("value")); As you know want to call the Insert in the Translation_Tables package you made. -- Preben Randhol http://www.pvv.org/~randhol/