From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a0c:ec10:: with SMTP id y16mr6049479qvo.163.1586536441466; Fri, 10 Apr 2020 09:34:01 -0700 (PDT) X-Received: by 2002:a4a:6b09:: with SMTP id g9mr4847781ooc.2.1586536441157; Fri, 10 Apr 2020 09:34:01 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!fdn.fr!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 10 Apr 2020 09:34:00 -0700 (PDT) In-Reply-To: <5e8edf69$0$18432$e4fe514c@news.kpn.nl> Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=76.77.182.20; posting-account=W2gdXQoAAADxIuhBWhPFjUps3wUp4RhQ NNTP-Posting-Host: 76.77.182.20 References: <5e8edf69$0$18432$e4fe514c@news.kpn.nl> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Using Generic Pasckages From: Stephen Leake Injection-Date: Fri, 10 Apr 2020 16:34:01 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:58341 Date: 2020-04-10T09:34:00-07:00 List-Id: On Thursday, April 9, 2020 at 1:40:11 AM UTC-7, ldries46 wrote: > I have created some generic packages. tese are packages that only do the= =20 > same thing but with other types. Till now I did only need these packages= =20 > without interaction with between packages using the same type. I just=20 > can declare them: > Package AA is new BB(type); then calling them as > A :=3D AA.Get_Value; > No other declaration seemed to be neccesary . >=20 > Now I have the following situation: > Package AA is new BB(integer); > Package CC is new BB(integer); > and a case where I have several statements using Package AA in one=20 > condition and CC the other case. > I want=C2=A0 to do that by using: > if D then EE :=3D AA; else EE :=3D CC; end if; Why do you have both AA and CC? Clearly they instantiate to the same code. = Eliminate one of them. Unless you've simplified things for this post, in which case you've simplif= ied too much. -- Stephe