From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: decomposing large packages
Date: Wed, 8 Jan 2020 17:36:57 +0100
Date: 2020-01-08T17:36:57+01:00 [thread overview]
Message-ID: <qv50f8$mut$1@gioia.aioe.org> (raw)
In-Reply-To: dad5cd25-5eca-499c-bb24-7441eb3b3c33@googlegroups.com
On 2020-01-08 16:56, mario.blunk.gplus@gmail.com wrote:
> 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;
You can use separate bodies. See ARM 10.1.3. E.g. in your case:
----file--- p.adb ---------
package body P is:
procedure m (value : in thing) is separate;
procedure n (value : in thing; temp : in natural) is separate;
end P;
----file--- p-m.adb -------
separate (P)
procedure m (value : in thing) is
begin
...
end m;
----file--- p-n.adb -------
separate (P)
procedure n (value : in thing; temp : in natural) is
begin
...
end n;
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2020-01-08 16:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 15:56 decomposing large packages mario.blunk.gplus
2020-01-08 16:36 ` Dmitry A. Kazakov [this message]
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