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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8c4274b8fd2e1f83 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!newsfeed01.chello.at!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: generic child package Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1153637097.986754.139160@75g2000cwc.googlegroups.com> <18vshm271kljo$.14dm2c0ayqmwz$.dlg@40tude.net> <1153677426.833491.45220@b28g2000cwb.googlegroups.com> Date: Mon, 24 Jul 2006 09:26:22 +0200 Message-ID: NNTP-Posting-Date: 24 Jul 2006 09:26:20 MEST NNTP-Posting-Host: de9d611b.newsread4.arcor-online.net X-Trace: DXC=1H?S5T1@Z4>F:^Y;boJ3Y0:ejgIfPPld4jW\KbG]kaM8ea\9g\;7Nm5bI_GPY;aen;[6LHn;2LCV>7enW;^6ZC`4IXm65S@:3>? X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:5892 Date: 2006-07-24T09:26:20+02:00 List-Id: On 23 Jul 2006 10:57:06 -0700, nblanpain@hotmail.com wrote: > yes excuse me : > > generic > type T_Toto is private; > > but are you sur it is : > with P_Child1 is new Parent.Child1; > and not > with P_Child1 is new Parent.Child1 (<>); Side comment. Both are wrong. It must be "with package is ..". The box (<>) indicates that the parameters of a package instance could be any. Parent.Child1 does not have parameters of its own, so no box. In (rare) case you wished to pass P_Child1, child of a *different* instance of Parent, you would pass its Parent as well: with Parent.Child1; generic with package P is new Parent (<>); -- Parent has parameters, we don't care which, so the box with package P_Child1 is new P.Child1; -- Note, how P_Child1 refers to P, an instance of Parent potentially -- different from the parent of Child2 package Parent.Child2 is type T_Child2 is new P_Child1.T_Child1 with null record; end Parent.Child2; -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de