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 X-Google-Attributes: gid103376,public From: gauthier@unilim.fr (Michel Gauthier) Subject: Re: Strongly coupled generic children? Date: 1996/04/23 Message-ID: #1/1 X-Deja-AN: 150967220 references: <4lib04$juq@rigel.rz.uni-ulm.de> organization: Universite de Limoges newsgroups: comp.lang.ada Date: 1996-04-23T00:00:00+00:00 List-Id: In article <4lib04$juq@rigel.rz.uni-ulm.de>, rodemann@mathematik.uni-ulm.de (Joerg Rodemann) wrote: >> 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 >> [...] >> 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). >> [...] >> 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? >> [...] >> 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 This is a problem that I reached, too. The solution that came to my mind is also to pass X.Y as a package parameter of X.Z, as you suggest. It worked in one case, but I got many gnat crashes in most cases. For some projects, the workaround to these crashes have been to declare many _private_ entities in the root, and install renamings or similar in the childs. I am aware that it is no more than a workaround. ---------- ---------- ---------- ---------- Michel Gauthier / Laboratoire d'informatique 123 avenue Albert Thomas / F-87060 Limoges telephone +33 () 55457335 [or ~ 7232] fax +33 () 55457315 [or ~7201] ---------- ---------- ---------- ---------- La grande equation de la fin du siecle : windows-X = Mac-Y The main end-of-century equation : windows-X = Mac-Y ---------- ---------- ---------- ---------- Si l'an 2000 est pour vous un mysticisme stupide, utilisez la base 9 If you feel year 2000 a stupid mystic craze, use numeration base 9 ---------- ---------- ---------- ----------