From: mario.blunk.gplus@gmail.com
Subject: decomposing large packages
Date: Wed, 8 Jan 2020 07:56:46 -0800 (PST)
Date: 2020-01-08T07:56:46-08:00 [thread overview]
Message-ID: <dad5cd25-5eca-499c-bb24-7441eb3b3c33@googlegroups.com> (raw)
Hello,
I have a package P (spec and body) which is becoming greater and greater as more functionality is implemented. Is there a way to decompose the package into smaller packages S1, S2, etc ? I'm thinking of a kind of "include" directive that refers to the files where stuff has been moved. Example:
The package P in the current state contains:
package P is
type thing is ...
procedure m (value : in thing);
procedure n (value : in thing; temp : in natural);
end package P;
package body P is:
procedure m (value : in thing) is ...
procedure n (value : in thing; temp : in natural) is ...
end package body P;
From inside package P the procedure n can be called which is fine so far.
Now I want to take out procedure n and move it into package S1:
package S1 is
procedure n (value : in thing; temp : in natural);
end package S1;
package body S1 is:
procedure n (value : in thing; temp : in natural) is ...
end package body S1;
Now procedure n must be visible from inside package P. How can I accomplish that ? I played with child units but did not get what I wanted. The parent P unit must see the procedures and functions of the child units P.S1, P.S2, ... but the compiler complains that procedure n is not defined for type thing in P.
Thanks for your help in advance.
next reply other threads:[~2020-01-08 15:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 15:56 mario.blunk.gplus [this message]
2020-01-08 16:36 ` decomposing large packages Dmitry A. Kazakov
2020-01-09 8:25 ` mario.blunk.gplus
2020-01-09 8:58 ` Dmitry A. Kazakov
2020-01-09 18:24 ` G. B.
2020-01-10 20:03 ` mario.blunk.gplus
2020-01-08 16:45 ` Simon Wright
2020-01-09 8:28 ` mario.blunk.gplus
2020-01-09 17:43 ` Simon Wright
2020-01-10 20:00 ` mario.blunk.gplus
2020-01-08 21:41 ` Shark8
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox