Re: Declaring private packages to instantiate generics?
Am 17.05.2012 05:37, schrieb Adam Beneschan:
> On Wednesday, May 16, 2012 7:36:27 AM UTC-7, Adam Beneschan wrote:
[...]
> I just got reminded by Tucker Taft that there's a problem if P has
> parameters. The parameters aren't listed in a generic_instantiation:
>
> package FOO is procedure P (Param : in Integer; Param2 : out Integer); end
> FOO;
>
> package body FOO is package BAR is new SOME_GENERIC_PACKAGE; procedure P is
> new BAR.P; end FOO;
>
> This makes it less clear to the eye that the second P completes the first
> one. (This would especially be a problem if there is more than one P with
> different parameter profiles in the specification.) This makes it
> clearer:
>
> package FOO is procedure P (Param : in Integer; Param2 : out Integer); end
> FOO;
>
> package body FOO is package BAR is new SOME_GENERIC_PACKAGE; procedure
> New_P is new BAR.P; procedure P (Param : in Integer; Param2 : out Integer)
> renames New_P; end FOO;
>
> So there's a good reason why the rules are the way they are.
You're right, thanks for the follow-up. And it's even the case in my case, I
have a whole bunch of Ps which are implemented as instantiations of the same
procedure.
Markus
PS: Sorry for rewrapping your part of the mail but my NNTP server started to
complain about lines longer than 79 characters when posting.
|