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,c360d0cfa1003043,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-04 12:19:26 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjcppf01.usenetserver.com!usenetserver.com!news-west.rr.com!lsnws01.we.mediaone.net!typhoon.san.rr.com!not-for-mail Message-ID: <3BBCB63C.96E484EA@san.rr.com> From: Darren New Organization: Boxes! X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Novice Ada Programmer Stumped By Simple Type Declaration! Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 04 Oct 2001 19:19:37 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: typhoon.san.rr.com 1002223177 66.75.151.160 (Thu, 04 Oct 2001 12:19:37 PDT) NNTP-Posting-Date: Thu, 04 Oct 2001 12:19:37 PDT Xref: archiver1.google.com comp.lang.ada:13735 Date: 2001-10-04T19:19:37+00:00 List-Id: Here's the basics of what I have -- I have a generic package called DNew.Unbounded_Array, with a formal private type being the components of the array. (This is roughly analogous to Unbounded_String only with non-character components.) I then have package URI_pkg is type URI is new Unbounded_String; package URI_List_Pkg is new DNew.Unbounded_Array(Component_Type => URI); subtype URI_List is URI_List_Pkg.Unbounded_Array; function To_URI(S : String) return 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 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. test-beep_core_profile_registry_pkg.adb:42:26: no candidate interpretations match the actuals: test-beep_core_profile_registry_pkg.adb:42:34: expected private type "URI" defined at beep-core-uri_pkg.ads:8 test-beep_core_profile_registry_pkg.adb:42:34: found private type "Unbounded_Array" defined at dnew-util-unbounded_array_pkg.ads:13, instance at beep-core-uri_pkg.ads:10 test-beep_core_profile_registry_pkg.adb:42:34: ==> in call to "Append" at beep -core-uri_pkg.ads:8(inherited) I believe it may be expecting the Append from Unbounded_String and getting confused. Any help, from anyone? The complete set of sources are available at http://home.san.rr.com/dnew/beepcore.zip. Thanks in advance for any advice! -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. Who is this Dr. Ibid anyway, and how does he know so much?