comp.lang.ada
 help / color / mirror / Atom feed
From: mfeldman@seas.gwu.edu (Mike Feldman)
Subject: Enumeration_IO
Date: 8 May 90 00:41:13 GMT	[thread overview]
Message-ID: <1846@sparko.gwu.edu> (raw)

In preparing some programs for a book I am working on, I have gotten
interested in the idiosyncracies of Enumeration_IO. Specifically, the
PUT operations in this generic package are supposed to have a parameter
SET of type TYPE_SET, where TYPE_SET is (LOWER_CASE, UPPER_CASE).

Well, consider an enumeration type
  type COLORS is (red, blue, green);
and an instance 
  package COLOR_IO is new TEXT_IO.ENUMERATION_IO(ENUM => COLORS);
and a variable
  C : COLORS := blue;
and an output operation
  COLOR_IO.PUT(ITEM => C);

All is well so far, everything compiles and runs except that the output
value is BLUE, because the default is Upper_Case. Now change the output
operation to
  COLOR_IO.PUT(ITEM => C, SET => LOWER_CASE);

Irvine Ada (HP835), IntegrAda (IBM-PC), VADS (Sun3) and AdaVantage (Sun3)
ALL bail out on a "LOWER_CASE is an undefined identifier" diagnostic.
Clearly something is going on here. According to LRM 14.3.9 this should be
allowed. Can anyone provide some enlightenment here?

I will post a program if anyone wants to try this out.
---------------------------------------------------------------------------
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
---------------------------------------------------------------------------

             reply	other threads:[~1990-05-08  0:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-05-08  0:41 Mike Feldman [this message]
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       ` Enumeration_IO Mike Feldman
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