From: mfeldman@seas.gwu.edu (Mike Feldman)
Subject: Re: Enumeration_IO
Date: 10 May 90 03:01:12 GMT [thread overview]
Message-ID: <1856@sparko.gwu.edu> (raw)
In-Reply-To: 1874@gould.doc.ic.ac.uk
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.<enum_type> ? 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
---------------------------------------------------------------------------
next prev parent reply other threads:[~1990-05-10 3:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1990-05-08 0:41 Enumeration_IO Mike Feldman
1990-05-08 16:38 ` Enumeration_IO Alex Blakemore
1990-05-08 18:32 ` Enumeration_IO Mike Feldman
1990-05-09 22:36 ` Enumeration_IO M Y Ben Gershon
1990-05-10 3:01 ` Mike Feldman [this message]
1990-05-08 23:53 ` Enumeration_IO M Y Ben Gershon
-- strict thread matches above, loose matches on Subject: below --
1990-05-08 17:54 Enumeration_IO dritz
2000-04-06 0:00 Enumeration_IO NANCY HEHIR
2000-04-07 0:00 ` Enumeration_IO Jeff Carter
2000-04-07 0:00 ` Enumeration_IO Robert Dewar
2000-04-08 0:00 ` Enumeration_IO Jeff Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox