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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2e27f5c95ae373a1 X-Google-Attributes: gid103376,public From: sean@graph.es.hac.com (Sean McNeil) Subject: Re: Generic child units with Gnat Date: 1995/03/31 Message-ID: #1/1 X-Deja-AN: 100649474 references: <3l5q2n$6le@unix.sbu.ac.uk> <3le685$l9h@Starbase.NeoSoft.COM> organization: Hughes Aircraft Company newsgroups: comp.lang.ada Date: 1995-03-31T00:00:00+00:00 List-Id: In article <3le685$l9h@Starbase.NeoSoft.COM> dweller@Starbase.NeoSoft.COM (David Weller) writes: > --File: complexnumbers-polar.ads > generic > package ComplexNumbers.Polar is > procedure bar( Dummy : in FloatType); > end ComplexNumbers.Polar; > > ... > > --Filename foobar.adb > with ComplexNumbers.Polar; -- auto visibility to parent > procedure FooBar is > package RealComplexNumbers is new ComplexNumbers( Float); > package PolarRealComplexNumbers is new RealComplexNumbers.Polar; > begin -- FooBar > null; > end FooBar; > Since it appears that ComplexNumbers.Polar is only dependant on FloatType from the parent package, wouldn't the following be better? --File: complexnumbers-polar.ads package ComplexNumbers.Polar is procedure bar( Dummy : in FloatType); end ComplexNumbers.Polar; --Filename foobar.adb with ComplexNumbers.Polar; -- auto visibility to parent procedure FooBar is package RealComplexNumbers is new ComplexNumbers( Float); package PolarRealComplexNumbers renames RealComplexNumbers.Polar; begin -- FooBar null; end FooBar; One less generic instantiation. Sean McNeil smcneil@netcom.com