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: bobduff@world.std.com (Robert A Duff) Subject: Re: types in procedure arguments Date: 1996/10/01 Message-ID: #1/1 X-Deja-AN: 186457355 references: <5268qg$r1t@noc2.drexel.edu> <52piii$8n7@noc2.drexel.edu> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-10-01T00:00:00+00:00 List-Id: In article <52piii$8n7@noc2.drexel.edu>, Chris Papademetrious wrote: > I have gotten some replies via email, and am beginning to believe >that this is a more interesting problem than I first thought! Here's >a very simplified version of the situation. Essentially, in the real >problem, I'm using a presupplied doubly-linked-list package and vector >math package (gotta put that reuse principle to work, right?). Now that I see the source code, I see what you're talking about. You need to have just one instantiation of Tst_Double_List, not two. You could make that a library unit, and import it into both Tst_Best_Congruence and Tst. However, I assume Tst_Best_Congruence is the re-used thing, and you don't want to modify it. In that case, you could do something like this: with Tst_Best_Congruence; with Tst_Vectors; procedure Tst is package Vec_List renames Tst_Best_Congruence.Vec_List; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ L: Vec_List.LIST_ID; begin Tst_Best_Congruence.Best_Congruence(L); end Tst; Or, don't use the renaming, and just say: L: Tst_Best_Conguence.Vec_List.LIST_ID; Or, use use_clauses: with Tst_Best_Congruence; use Tst_Best_Congruence; use Tst_Best_Congruence.Vec_List; with Tst_Vectors; procedure Tst is L: LIST_ID; begin Best_Congruence(L); end Tst; (I didn't compile these -- sorry for any silly mistakes.) > procedure Best_Congruence > ( > List: in Point_List.LIST_ID > ) is > begin > List := List; That's illegal -- you can modify an 'in' parameter. - Bob