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 X-Google-Thread: 103376,2851ff92c60d12a6,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-23 06:08:01 PST Path: supernews.google.com!sn-xit-03!supernews.com!freenix!jussieu.fr!univ-angers.fr!univ-rennes1.fr!news!univ-lille1.fr!news.cict.fr!not-for-mail From: Veronique GAILDRAT Newsgroups: comp.lang.ada Subject: pb with child units Date: Fri, 23 Feb 2001 15:06:05 +0100 Organization: IRIT Message-ID: <3A966E4D.778BE01E@irit.fr> NNTP-Posting-Host: sunvox.irit.fr Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.cict.fr 982937165 8945 141.115.20.102 (23 Feb 2001 14:06:05 GMT) X-Complaints-To: postmaster@cict.fr NNTP-Posting-Date: 23 Feb 2001 14:06:05 GMT X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en Xref: supernews.google.com comp.lang.ada:5471 Date: 2001-02-23T14:06:05+00:00 List-Id: Hello, I try to call a subprogram from a brother unit : specification of the parent unit : --------------------------------- generic type Item is private; with function image (t : Item) return String; with function equals (i1, i2 : Item) return boolean; package liste_dyn_gen_p is type Liste is limited private; LISTE_VIDE, LISTE_PLEINE, ERREUR_INDEX : exception; -- d�clarations des op�rations export�es par le TDA function toString (le : Liste) return String; ........ private type Cellule; type Liste is access Cellule; type Cellule is record value : Item; nextV : Liste; end record; end liste_dyn_gen_p; specification of the called unit : --------------------------------- generic package liste_dyn_gen_p.liste_simple_p is procedure insererEnTete (le : in out Liste; i : Item); .... end liste_dyn_gen_p.liste_simple_p; call : ------ specification : --------------- generic with function "<"(i1, i2 : Item) return Boolean; package liste_dyn_gen_p.liste_dyn_triee_p is procedure inserer (le : in out Liste; e : Item); end liste_dyn_gen_p.liste_dyn_triee_p; body : ------ 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 pt : Liste := le; pTmp : Liste; begin if estVide(le) or else e < premier(le) then ----> error ----> liste_dyn_gen_p.liste_simple_p.insererEnTete(le, e); else ...... end if; end inserer; end liste_dyn_gen_p.liste_dyn_triee_p; The compiling error is the next one : invalid prefix in selected component "liste_simple_p" but liste_simple_p is a child unit of liste_dyn_gen_p ! They are both generic, but a can use them in a child unit ?? An idea ?? Thanks -- ------------------------ Veronique Gaildrat IRIT-UPS email : gaildrat@irit.fr ------------------------