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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,ce80c96b46825a21 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!a31g2000vbt.googlegroups.com!not-for-mail From: iloAda Newsgroups: comp.lang.ada Subject: Re: Using the Hash function Date: Fri, 22 Jul 2011 01:29:10 -0700 (PDT) Organization: http://groups.google.com Message-ID: <83a6e82e-237e-45fa-b7ba-01c3f1bf9f98@a31g2000vbt.googlegroups.com> References: <82y5zq4yes.fsf@stephe-leake.org> NNTP-Posting-Host: 137.194.2.20 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1311323444 8776 127.0.0.1 (22 Jul 2011 08:30:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 22 Jul 2011 08:30:44 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a31g2000vbt.googlegroups.com; posting-host=137.194.2.20; posting-account=r1a26AoAAAD4nbikbegb_8j7mwzetiwY User-Agent: G2/1.0 X-HTTP-Via: 1.1 proxy1.enst.fr (squid) X-Google-Web-Client: true X-Google-Header-Order: HRUAELSCVFNK X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20294 Date: 2011-07-22T01:29:10-07:00 List-Id: On Jul 22, 8:33=A0am, Stephen Leake wrote: > iloAda writes: > > Hello everybody!! > > > I am trying to use the hash function of the Unbounded_Strings package! > > > Here's the code (very simple): > > > 1 =A0 function Unbounded_String_Hash > > 2 =A0 =A0(U_Str : Ada.Strings.Unbounded.Unbounded_String) > > 3 =A0 =A0 =A0return Ada.Containers.Hash_Type > > 4 =A0 is > > 5 > > 6 =A0 begin > > 7 > > 8 =A0 =A0return Ada.Strings.Unbounded.Hash (U_Str); > > 9 =A0 end Unbounded_String_Hash; > > > I is giving me the following error on line 8 when I try to compile: > > missing "with Unbounded.Hash"; > > > Can anybody tell me what's going on (knowing that Unbounded.Hash isn(t > > an existing package)!! > > It isn't a package, it's a function. But it is declared at library > level, as a separate compilation unit. So it needs a 'with' clause. > > -- > -- Stephe Ok....thanks guys!!