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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2851ff92c60d12a6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-23 06:44:08 PST Path: supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!news-xfer.siscom.net!news-out.nuthinbutnews.com!news-in-austin.nuthinbutnews.com!feed2.newsfeeds.com!newsfeeds.com!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison Sender: usenet@www.newsranger.com References: <3A966E4D.778BE01E@irit.fr> Subject: Re: pb with child units Message-ID: Date: Fri, 23 Feb 2001 14:43:05 GMT NNTP-Posting-Host: 127.0.0.1 X-Complaints-To: abuse@newsranger.com X-Trace: www.newsranger.com 982939385 127.0.0.1 (Fri, 23 Feb 2001 09:43:05 EST) NNTP-Posting-Date: Fri, 23 Feb 2001 09:43:05 EST Organization: http://www.newsranger.com Xref: supernews.google.com comp.lang.ada:5474 Date: 2001-02-23T14:43:05+00:00 List-Id: In article <3A966E4D.778BE01E@irit.fr>, Veronique GAILDRAT says... > >I try to call a subprogram from a brother unit : >generic >package liste_dyn_gen_p.liste_simple_p is > procedure insererEnTete (le : in out Liste; i : Item); .. >with liste_dyn_gen_p.liste_simple_p; > >package body liste_dyn_gen_p.liste_dyn_triee_p is > procedure inserer (le : in out Liste; e : Item) is > begin >----> error ----> liste_dyn_gen_p.liste_simple_p.insererEnTete(le, e); > invalid prefix in selected component "liste_simple_p" > >but liste_simple_p is a child unit of liste_dyn_gen_p ! No, its not. Its a child unit of an *instantiation* of liste_dyn_gen_p. You can't make a call to a generic, only to an *instantiation* of one. You could make an instantiation of liste_simple_p in the body of liste_dyn_triee_p, but that's probably not what you want because that instantiation would be different than any others you might have outside of liste_dyn_triee_p. If you want access to a routine in a *particular* instantiation of a generic package that is not your package's ancestor, you will have to have it (the routine or the package) supplied as a generic parameter to your package. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com