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-Thread: 103376,ce80c96b46825a21 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Using the Hash function Date: Thu, 21 Jul 2011 15:57:53 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="31135"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19t9NTq46FJsxOW8Km1g1sjUQ10Brqnntk=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:JzUO/NFkuRVcmYMSVPcErGqCj7M= sha1:wVR13FHExPJyXmCRj9mqeH+9brI= Xref: g2news1.google.com comp.lang.ada:20268 Date: 2011-07-21T15:57:53+01:00 List-Id: iloAda writes: > Hello everybody!! > > I am trying to use the hash function of the Unbounded_Strings package! > > Here's the code (very simple): > > 1 function Unbounded_String_Hash > 2 (U_Str : Ada.Strings.Unbounded.Unbounded_String) > 3 return Ada.Containers.Hash_Type > 4 is > 5 > 6 begin > 7 > 8 return Ada.Strings.Unbounded.Hash (U_Str); > 9 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)!! > > Thanks > > Elie You need to say with Ada.Strings.Unbounded.Hash; as well as Ada.Containers.