From: brh@cray.com (Brian R. Hanson)
Subject: How is this done?
Date: 22 Dec 94 11:35:00 CST
Date: 1994-12-22T11:35:00-06:00 [thread overview]
Message-ID: <1994Dec22.113500.14671@driftwood.cray.com> (raw)
Given the following package and procedure definitions -
with Text_Io;
package body Gen_List is
procedure View (L: in List) is
begin
Text_Io.Put_Line("This is output from view = " & List'Image(L));
end;
end Gen_List;
generic
package Gen_List is
type List is new Integer;
procedure View (L: in List);
end Gen_List;
package body New_List is
procedure Init (L: out List) is
begin
L := 5;
end;
end New_List;
with Gen_List;
package New_List is
type List is private;
procedure View (L: in List);
procedure Init (L: out List);
private
package Old_List is new Gen_List;
type List is new Old_List.List;
end New_list;
with New_List; use New_list;
procedure test is
A: List;
begin
View(A);
end test;
What needs to be done to have New_List.View use the View procedure
that is the result of the type definition for New_List.List?
If I define a body for View in the body of New_List than it overrides
the procedure made available by the type definition - but I have to
provide a procedure View to get things to compile.
Brian
brh@cray.com
next reply other threads:[~1994-12-22 17:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-12-22 17:35 Brian R. Hanson [this message]
1994-12-23 15:26 ` How is this done? Norman H. Cohen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox