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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a041c7c5a234c583 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Tue, 06 Sep 2005 13:13:40 -0500 From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: children unity References: <1126025898.866369.318320@g47g2000cwa.googlegroups.com> Date: Tue, 06 Sep 2005 20:14:05 +0200 Message-ID: <87ll2aqd1u.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:DSEB85u8hrsrEP50cZ6mgz0s7Uc= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 83.134.242.237 X-Trace: sv3-OBzilakOIqUYo/Oe3ZKsdN6krMOcvHPBNkwsaaGno5Aevcnv96DVINcfVEL4ntxEIMleIyJxv7Xv5PC!ea5+2gdKFvkk26z0AQ67/C3pLrOWws7GLrbkk/rMMmL9yl2JOtE/7vOKrw8wW8otZ8dEphzz2jU= X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:4482 Date: 2005-09-06T20:14:05+02:00 List-Id: "nicolas.b" writes: > this is an example : > > generic > type Toto is private; > package Father is > ... > end Father; > > generic > type Titi is private; > procedure Father.Children (...); > > My question : How can i use the children unity Father.Children ? > package Inst_Father is new Father (Toto => ...); > procedure Inst_Children is new Father.Children (Titi => ...); -- procedure Inst_Children is new Inst_Father.Children (Titi => ...); > compilation error ??? > > can you explain me, A child unit cannot be the child of a generic, because the generic does not exist in the executable program. Instead, you can have children of real units which are instances of a generic. Corollary: any child of a generic unit must also be declared generic, e.g. generic ... package P is ... end P; generic -- required even if no parameters package P.Q is ... end P.Q; HTH -- Ludovic Brenta.