From: ecragg@GMUVAX.GMU.EDU ("EDWARD CRAGG")
Subject: Enumeration type "importation" problem
Date: 20 Jun 89 14:00:00 GMT [thread overview]
Message-ID: <8906201355.AA03066@ajpo.sei.cmu.edu> (raw)
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
reply other threads:[~1989-06-20 14:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox