comp.lang.ada
 help / color / mirror / Atom feed
* Enumeration I/O
@ 1998-02-10  0:00 Melanie Shatilla
  1998-02-09  0:00 ` Matthew Heaney
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Melanie Shatilla @ 1998-02-10  0:00 UTC (permalink / raw)



Hi,

I'm in my second semester of Computer Science and I hope someone can
help me solve a very basic problem, for which I can't seem to find a
solution to in any of my textbooks :

I've declared an enumeration type with character literals, and a
variable of this type, for example :
    TYPE Symbols is ('%', '$', 'a');
    Symb : Symbols := '$';

    package Symbols_IO is new Text_IO.Enumeration_IO(Symbols);

When I give the instruction :
    Symbols_IO.Put(Symb);

...I get the right symbol but with the quotes (and I don't want them).
Obviously, I've thought of writing something like :

    If Symb = '$' then
        Text_IO.Put ('$');
    end if;

..but there must be a more convenient way, I hope! Any suggestions
anyone ?





^ permalink raw reply	[flat|nested] 6+ messages in thread
* Enumeration I/O
@ 1990-05-08 15:45 Rick Conn
  0 siblings, 0 replies; 6+ messages in thread
From: Rick Conn @ 1990-05-08 15:45 UTC (permalink / raw)


Mike, try
  COLOR_IO.PUT(ITEM => C, SET => COLOR_IO.LOWER_CASE);

It doesn't know where LOWER_CASE is coming from otherwise.

Rick Conn

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-02-11  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-10  0:00 Enumeration I/O Melanie Shatilla
1998-02-09  0:00 ` Matthew Heaney
1998-02-10  0:00 ` John J. Cupak Jr.
1998-02-10  0:00 ` Nick Roberts
1998-02-11  0:00   ` Ray Blaak
  -- strict thread matches above, loose matches on Subject: below --
1990-05-08 15:45 Rick Conn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox