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!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!GMUVAX.GMU.EDU!ecragg From: ecragg@GMUVAX.GMU.EDU ("EDWARD CRAGG") Newsgroups: comp.lang.ada Subject: Enumeration type "importation" problem Message-ID: <8906201355.AA03066@ajpo.sei.cmu.edu> Date: 20 Jun 89 14:00:00 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: I am looking for a simple way to make an enumeration type which is declared in one package an integral part of a second package as follows: package SYSTEM_INTERFACE_TO_BE_HIDDEN_FROM_AVERAGE_USER is type SYS_STATUS is ( OK, SOME_ERROR ); . . . end SYSTEM_INTERFACE_TO_BE_HIDDEN_FROM_AVERAGE_USER; with SYSTEM_INTERFACE_TO_BE_HIDDEN_FROM_AVERAGE_USER; package AVERAGE_USER_INTERFACE is -- somehow I would like to declare STATUS such that -- 1) OK and SOME_ERROR are the values for status -- 2) = and /= are visible without needing to with and use -- SYSTEM_INTERFACE_TO_BE_HIDDEN_FROM_AVERAGE_USER -- 3) there is a simple way to convert between STATUS and SYS_STATUS -- (note, since in real life there are several hundred -- enumeration values for SYS_STATUS, I do not regard a CASE -- conversion to be 'simple' -- -- SUBTYPE and RENAMES satisfy 1 and 3 but not 2, -- declaring a separate type and writing my own conversion -- functions satisfy 1 and 2 but not 3. end AVERAGE_USER_INTERFACE; Does anyone have any thoughts? ............................................................ Edward E Cragg Bitnet: ECRAGG@GMUVAX Internet: ECRAGG@GMUVAX.GMU.EDU