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.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c360d0cfa1003043 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-04 12:50:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!ihug.co.nz!out.nntp.be!propagator-SanJose!news-in-sanjose!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <3BBCB63C.96E484EA@san.rr.com> Subject: Re: Novice Ada Programmer Stumped By Simple Type Declaration! Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Thu, 04 Oct 2001 15:50:13 EDT Organization: http://www.newsranger.com Date: Thu, 04 Oct 2001 19:50:13 GMT Xref: archiver1.google.com comp.lang.ada:13739 Date: 2001-10-04T19:50:13+00:00 List-Id: In article <3BBCB63C.96E484EA@san.rr.com>, Darren New says... >It seems no matter what "with" and "use" clauses I use, it can't resolve >the Append to be the appropriate one. GNAT gives all kinds of errors, >none of which make much sense. A good first step in any such problem is to get rid of all use clauses and try to resolve things with full named notation. (I'd also claim that's a good first step in *any* situation, but it really is true here :-) ). >package URI_pkg is > package URI_List_Pkg is new DNew.Unbounded_Array(Component_Type => >URI); .. >Now, DNew.Unbounded_Array defines a type called Unbounded_Array (of >course), as well as >procedure Append(X : in out Unbounded_Array; Y : in Component_type); >procedure Append(X : in out Unbounded_Array; Y : in Unbounded_Array); > > >The problem comes when, in an unrelated package, I have > >procedure test1 is > U : URI := To_URI("http://..."); > UL : URI_List; >begin > Append(UL, U); >end test1; It looks like you should be calling URI_Pkg.URI_List_Pkg.Append. But from the message you gave, I'm guessing it found it but couldn't resolve the overload. It could be that your compiler (Gnat?) was getting confused because you had two Unbounded_Array's defined in its scope: One a package, and the other a subtype. You'd think it should be able to sort that out, but I've seen other situations where Gnat (3.13p) gets horribly confused by similarly named things. I could never narrow the problem down enough to satify the report@gnat.com gods, but rest asured the problem is in there. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.