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.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!seas.gwu.edu!mfeldman From: mfeldman@seas.gwu.edu (Mike Feldman) Newsgroups: comp.lang.ada Subject: Re: Enumeration_IO Message-ID: <1856@sparko.gwu.edu> Date: 10 May 90 03:01:12 GMT References: <1846@sparko.gwu.edu> <1117@software.software.org> <1850@sparko.gwu.edu> <1874@gould.doc.ic.ac.uk> Reply-To: mfeldman@seas.gwu.edu () Organization: The George Washington University, Washington D.C. List-Id: In article <1874@gould.doc.ic.ac.uk> umace03@doc.ic.ac.uk (M Y Ben Gershon) writes: > >>In article <1850@sparko.gwu.edu> mfeldman@seas.gwu.edu (Mike Feldman) writes: > >> COLOR_IO.PUT(ITEM => C, SET => TEXT_IO.LOWER_CASE); >> ^^^^^^^^ > >Yes, OK. But why doesn't COLOR_IO.LOWER_CASE work, seeing that we are using > >package COLOR_IO is new TEXT_IO.ENUMERATION_IO(ENUM => COLORS); > >shouldn't it follow that LOWER_CASE is distinct for each separate instantiation >of TEXT_IO. ? Yet, if I put COLOR_IO.LOWER_CASE it doesn't work, >giving the same error message as before. Well, now that I'm such an expert, this one is easy. It's because the enumeration type TYPE_SET (which contains the literals UPPER_CASE and LOWER_CASE) is exported from TEXT_IO (i.e. the outer layer) and NOT from any of the enclosed generic packages. Checking the LRM or a good text's appendix for the full spec of TEXT_IO will confirm this. So there's really only one set of literals, and it ain't exported from COLOR_IO! --------------------------------------------------------------------------- Prof. Michael Feldman Department of Electrical Engineering and Computer Science The George Washington University Washington, DC 20052 +1-202-994-5253 mfeldman@seas.gwu.edu ---------------------------------------------------------------------------