From: Preben Randhol <randhol+abuse@pvv.org>
Subject: Combining packages
Date: Wed, 31 Oct 2001 18:15:55 +0000 (UTC)
Date: 2001-10-31T18:15:55+00:00 [thread overview]
Message-ID: <slrn9u0jr0.5nn.randhol+abuse@kiuk0156.chembio.ntnu.no> (raw)
Hi
I have made a generic package called Double_Linked_List. I have also a
package called Wordgroups which has the type Wordgroup and several
functions/procedures connected with the type.
Now I want to have a List of Wordgroups.
First I made a child package Wordgroups.List of the Wordgroups pacakge
like this:
with Double_Linked_List;
with Wordgroups;
package Wordgroups.List is
new Double_Linked_List (Data_Type => Wordgroups.Wordgroup_Type);
Now I relized that it would be nice to have a procedure like:
procedure Add (List : in out List_Type;
Word : in String;
Explanation : in String) is
Wordgroup : Wordgroup_Type;
begin
Create (Wordgroup, Word, Explanation);
Append_Element (List, Wordgroup);
end Add;
so that I don't have to do:
Create (Wordgroup, Word, Explanation);
Append_Element (List, Wordgroup);
in the rest of the program, only Add.
But I cannot add this to Wordgroups.List.
I would appreciate some hints on how to do something like this. Thanks
in advance.
Preben Randhol
--
�.., chaos is found in greatest abundance wherever order is being
sought. It always defeats order, because it is better organized.�
-- Interesting Times, Terry Pratchett
next reply other threads:[~2001-10-31 18:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-31 18:15 Preben Randhol [this message]
2001-10-31 18:31 ` Combining packages Matthew Heaney
2001-10-31 20:27 ` Preben Randhol
2001-10-31 20:41 ` Matthew Heaney
2001-10-31 20:40 ` Preben Randhol
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox