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,1450359c2158b496,start X-Google-Attributes: gid103376,public From: rodemann@mathematik.uni-ulm.de (Joerg Rodemann) Subject: Strongly coupled generic children? Date: 1996/04/23 Message-ID: <4lib04$juq@rigel.rz.uni-ulm.de>#1/1 X-Deja-AN: 150963055 organization: University of Ulm, SAI, Germany newsgroups: comp.lang.ada Date: 1996-04-23T00:00:00+00:00 List-Id: Hi folks! Playing around with generics I stumbled over the following problem: 1.) I have a generic library unit x providing some key data of my problem Generic parameter: e.g. floating point type generic type Floating is digits <>; package x is ... end x; 2.) Added to this is a child package x.y which provides some tables used just for a small number of modules (This is different for x). generic package x.y is ... procedure SomeWhat; ... end x.y; 3.) Now I want to add another child unit x.z that provides some further information. This module needs access to the data contained in x.y but I do not want to put it into x.y because x.z may be exchanged by some other package (that possibly also uses x.y). Is there some way to do something like the following? with x.y; generic package x.z is ... procedure DoSomething; ... end x.z; package body x.z is ... procedure DoSomething is begin ... x.y.SomeWhat; ... end DoSomething; ... end x.z; Is it possible in Ada-95 to build up such a library structure? Or do I have to deliver an instantiation of x.y as a generic parameter to x.z in its instantiation? Any help appreciated Thanks George