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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!samsung!think.com!linus!linus!linus!mbunix!eachus From: eachus@aries.mitre.org (Robert I. Eachus) Newsgroups: comp.lang.ada Subject: Re: layering with discriminants Message-ID: Date: 5 Mar 91 01:56:07 GMT References: <44963@ut-emx.uucp> Sender: news@linus.mitre.org (News Service) Organization: The Mitre Corp., Bedford, MA. In-Reply-To: hasan@emx.utexas.edu's message of 2 Mar 91 00:28:55 GMT Nntp-Posting-Host: aries.mitre.org List-Id: This looks like another "meaningless restriction" for Ada9X to clean up, but for now it is real. Using Verdix, and wrapping the declaration as below to make it a record, works fine. This is not the only case where such a record wrapper is required, I usually run into it when I want to make the full declaration of a private type a subtype of another type. Note that I also got "bit" but not as badly when I decided to make adt a "real" discriminated record...I would have to pass String as a generic formal array type if I wanted St to depend on i. Robert I. Eachus GENERIC TYPE size IS (<>); PACKAGE g_lowLevel IS TYPE adt (i : size) IS PRIVATE; PRIVATE TYPE adt (i : size) IS RECORD St: String(1..10); END RECORD; END g_lowLevel; WITH g_lowLevel; GENERIC TYPE length IS (<>); PACKAGE g_highLevel IS TYPE adt (i : length) IS PRIVATE; PRIVATE PACKAGE low_level IS NEW g_lowLevel(length); TYPE adt (i : length) IS RECORD LL: low_level.adt(i); END RECORD; END g_highLevel; -- Robert I. Eachus "As far as Saddam Hussein being a great military strategist, he is neither a strategist, nor is he schooled in the operational arts, nor is he a tactician, nor is he a general, nor is he as a soldier... Other than that he's a great military man. I want you to know that." -- Gen. H. Norman Schwarzkopf, Saudia Arabia, Feb. 27, 1991