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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6e00ae5009f6fb00 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!news.cs.univ-paris8.fr!newsfeed.vmunix.org!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: "Rick Santa-Cruz" Newsgroups: comp.lang.ada Subject: Re: questions to generic Date: Wed, 29 Sep 2004 11:58:13 +0200 Organization: T-Online Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.t-online.com 1096451910 02 7852 NKCkXmXlCyMoL0O 040929 09:58:30 X-Complaints-To: usenet-abuse@t-online.de X-ID: bQM5iqZS8epVeWvACzYZueLMsEyopixrYBn70gPe09VCGdT0V4DTYd X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Xref: g2news1.google.com comp.lang.ada:4367 Date: 2004-09-29T11:58:13+02:00 List-Id: Hi, > yes, the way you have done. > > : where Gen_Test_Client is the start-procedure? > > no. It has to be instantiated somewhere to become a real procedure. And how and where do I have to instantiate the procedure then? > > : 2.) How is it possible to create a generic child package? > > You might find it useful to think of child packages as nested > packages. Consider the steps it takes to make an instance > of the outer package. After you have an instance of the outer > package, you are back at step 1, where you instantiate some generic > package :-) So is it this way correct: package Pack1 is generic type Element is private; package Child_Pack is procedure Proc(El: Element); end Child_Pack; end Pack1; --body package body Pack1 is package bodY Child_Pack is procedure Proc(El: Element) is El1: Element; begin El1:= El; end Proc; end Child_Pack; end Pack1; -- test-client: with Pack1; -- by the way when I write here: with Pack1.Child_Pack; I get a compilation-error. Why? procedure Gen_Test_Client is package S_2 is new Pack1.Child_Pack(Integer); .... Thanks, Rick