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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,2b4e4eade0270b85 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-29 09:25:18 PST Path: supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.mathworks.com!cyclone.swbell.net!nnrp1.sbc.net.POSTED!not-for-mail From: "Pat Rogers" Newsgroups: comp.lang.ada References: Subject: Re: (generic) child package of generic package; intantiation of X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <1Ihd6.38$cd1.2031@nnrp1.sbc.net> Date: Mon, 29 Jan 2001 11:25:14 -0600 NNTP-Posting-Host: 208.191.184.67 X-Complaints-To: abuse@pacbell.net X-Trace: nnrp1.sbc.net 980789117 208.191.184.67 (Mon, 29 Jan 2001 11:25:17 CST) NNTP-Posting-Date: Mon, 29 Jan 2001 11:25:17 CST Organization: SBC Internet Services Xref: supernews.google.com comp.lang.ada:4663 Date: 2001-01-29T11:25:14-06:00 List-Id: "Peter Hend�n" wrote in message news:LUgd6.9728$Qb7.1473404@newsb.telia.net... > I have the following: > > generic > Count : in Natural := 1; > package Parent is > ... > end Parent; > > generic > package Parent.RarelyUsedOps is > ... > end Parent.RarelyUsedOps; > > I have no problem instantiating Parent, of course, but how in the name of Ms > Lovelace do I instantiate the child package? Imagine the declaration of the child generic is nested within an *instantiation* of the parent unit, and use the instance name accordingly. For example, if an instance of the Parent is Foo, as in: package Foo is new Parent; we could say: package Bar is new Foo.RarelyUsedOps; If you keep the visibility issues in mind (i.e. the child's view of the parent's declarations) this approach will make more sense. --- Patrick Rogers Consulting and Training in: http://www.classwide.com Real-Time/OO Languages progers@classwide.com Hard Deadline Schedulability Analysis (281)648-3165 Software Fault Tolerance