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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,40d697764033dbdb X-Google-Attributes: gid103376,public From: st92j0gw@dunx1.ocs.drexel.edu (Chris Papademetrious) Subject: Re: types in procedure arguments Date: 1996/09/28 Message-ID: <52jqh0$pq@noc2.drexel.edu>#1/1 X-Deja-AN: 185884137 references: <5268qg$r1t@noc2.drexel.edu> organization: Drexel University newsgroups: comp.lang.ada Date: 1996-09-28T00:00:00+00:00 List-Id: I've got a small problem that most likely extends from my lack of knowledge about Ada 95, so I'm turning to the gurus for help. I have a procedure that I'd like to pass a list of "Points" (just a two-dimensional coordinate) as an input. Now, I have a doubly linked list type defined in a package. This package requires a generic argument of what it is a linked list *of*, so, I need to instantiate the list package with the parameter of type Point before I can define the input argument as a List argument. No problem, I'll just put the procedure in a package wrapper, and define the linked list type before the procedure, to make everything happy! Well, that works, except when I try to USE the procedure in another package. When I passed a list parameter where I call the procedure, I get the following error: lazarus(10:55)/home/chrispy/bot > gnatmake best_test gcc -c best_test.adb best_test.adb:45:35: expected private type "LIST_ID" defined at double_list.ads: 43 best_test.adb:45:35: found private type "LIST_ID" defined at double_list.ads:43 gnatmake: "best_test.adb" compilation error The source location for the type it expected and the type it got are the same, BUT they're incompatible types! To me, this means that this problem arises from the fact that I had to redefine the list type to be able to specify it as a function argument in the procedure package itself, because that is essentially a NEW, incompatible type. How the heck do I get around something like this?? - Chris -=-=-=-=-=-=-=-=-=-=-=-=- Chris Papademetrious Data Fusion Laboratory Drexel University Philadelphia, PA -=-=-=-=-=-=-=-=-=-=-=-=-