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 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.DFxaDADwSkn+6wW9Ah21PA.user.gioia.aioe.org!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Using Generic Pasckages Date: Thu, 09 Apr 2020 19:23:43 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <5e8edf69$0$18432$e4fe514c@news.kpn.nl> NNTP-Posting-Host: DFxaDADwSkn+6wW9Ah21PA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) Cancel-Lock: sha1:QESZIFZn5HiKqwrkjPd/etkZWfI= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:58338 Date: 2020-04-09T19:23:43+01:00 List-Id: ldries46 writes: > 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 > condition and CC the other case. > I want  to do that by using: > if D then EE := AA; else EE := CC; end if; > But I cannot find in the documentation  how the declaration of EE > should be made. Presume you mean if D then EE := AA.Get_Value; else EE := CC.Get_Value; end if; which will work fine as long as Get_Value returns the type that AA, CC were instantiated with & not some derived tye.