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/30 Message-ID: <52piii$8n7@noc2.drexel.edu>#1/1 X-Deja-AN: 186320633 references: <5268qg$r1t@noc2.drexel.edu> organization: Drexel University newsgroups: comp.lang.ada Date: 1996-09-30T00:00:00+00:00 List-Id: 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?). For the example below, I'm just using placeholder packages to illustrate. Clip the following section and run it through "gnatchop" and you will see the problem that leads to: lazarus(18:39)/home/chrispy/bot > gnatmake tst gcc -c tst.adb tst.adb:13:39: expected private type "LIST_ID" defined at tst_double_list.ads:4 tst.adb:13:39: found private type "LIST_ID" defined at tst_double_list.ads:4 gnatmake: "tst.adb" compilation error Thank you for your time and energy, folks. Several people have expressed interest in the outcome of this, and I thank you for your help in resolving it. - Chris -- cut here with Tst_Double_List; -- double linked-list package with Tst_Vectors; package Tst_Best_Congruence is package Vec_List is new Tst_Double_List(ELEMENT_OBJECT => Tst_Vectors.Vector); procedure Best_Congruence ( List: in out Vec_List.LIST_ID ); end Tst_Best_Congruence; generic type ELEMENT_OBJECT is private; package Tst_Double_List is type LIST_ID is limited private; private type LIST_ID is record Item1, Item2, Item3: ELEMENT_OBJECT; end record; end Tst_Double_List; package Tst_Vectors is type Vector is array (0..9) of Float; end Tst_Vectors; with Tst_Double_List; -- double linked-list package with Tst_Best_Congruence; with Tst_Vectors; procedure Tst is package Vec_List is new Tst_Double_List(ELEMENT_OBJECT => Tst_Vectors.Vector); L: Vec_List.LIST_ID; begin Tst_Best_Congruence.Best_Congruence(L); end Tst; package body Tst_Best_Congruence is procedure Best_Congruence ( List: in Point_List.LIST_ID ) is begin List := List; end Best_Congruence; end Tst_Best_Congruence; -=-=-=-=-=-=-=-=-=-=-=-=- Chris Papademetrious Data Fusion Laboratory Drexel University Philadelphia, PA -=-=-=-=-=-=-=-=-=-=-=-=-