From: st92j0gw@dunx1.ocs.drexel.edu (Chris Papademetrious)
Subject: Re: types in procedure arguments
Date: 1996/09/30
Date: 1996-09-30T00:00:00+00:00 [thread overview]
Message-ID: <52piii$8n7@noc2.drexel.edu> (raw)
In-Reply-To: 5268qg$r1t@noc2.drexel.edu
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
-=-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~1996-09-30 0:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-09-23 0:00 types in procedure arguments Chris Papademetrious
1996-09-25 0:00 ` Stephen Leake
1996-09-28 0:00 ` Chris Papademetrious
1996-09-28 0:00 ` Chris Papademetrious
1996-09-30 0:00 ` Chris Papademetrious [this message]
1996-10-01 0:00 ` Norman H. Cohen
1996-10-01 0:00 ` Robert A Duff
1996-10-01 0:00 ` Stephen Leake
1996-10-01 0:00 ` Robert Dewar
-- strict thread matches above, loose matches on Subject: below --
1996-09-28 0:00 Robert Dewar
1996-09-30 0:00 ` Chris Papademetrious
1996-09-30 0:00 ` Norman H. Cohen
1996-09-30 0:00 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox