comp.lang.ada
 help / color / mirror / Atom feed
From: Melanie Shatilla <hj791520@er.uqam.ca>
Subject: Enumeration I/O
Date: 1998/02/10
Date: 1998-02-10T00:00:00+00:00	[thread overview]
Message-ID: <34DF9BBF.9FEA859B@er.uqam.ca> (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 ?





             reply	other threads:[~1998-02-10  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-10  0:00 Melanie Shatilla [this message]
1998-02-09  0:00 ` Enumeration I/O 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
replies disabled

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