comp.lang.ada
 help / color / mirror / Atom feed
From: "John J. Cupak Jr." <jcj@swl.msd.ray.com>
To: Melanie Shatilla <hj791520@er.uqam.ca>
Subject: Re: Enumeration I/O
Date: 1998/02/10
Date: 1998-02-10T00:00:00+00:00	[thread overview]
Message-ID: <34E09277.41C67EA6@swl.msd.ray.com> (raw)
In-Reply-To: 34DF9BBF.9FEA859B@er.uqam.ca


Melanie Shatilla wrote:
> 
Well, Melanie,

You've gotten a number of interesting answers posted to this newsgroup,
and, I presume, e-mailed to you. All of which address your specific
question: 

> 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;
> 

However, I think that you are declaring and using this information for
a  purpose which you didn't identify. And, because of this, I think that
the correct answer depends on what you're trying to do, rather than what
the problem is with your syntax.

My guess is that you can use a CASE statement to check an input
character, then perform some action(s) based on which character you've
read.

Hope this points you an another direction to look for the answer.

Good luck!

-- 
----------------------------------------------------------------
-                   John J. Cupak Jr, CCP                      -
- Raytheon Electronic Systems: Software Engineering Laboratory -
- tel: 508-858-1222     email (work): jcj@swl.msd.ray.com      -
- fax: 508-858-4336     email (home): jcupak@aol.com           -
----------------------------------------------------------------




  parent 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 Enumeration I/O Melanie Shatilla
1998-02-09  0:00 ` Matthew Heaney
1998-02-10  0:00 ` John J. Cupak Jr. [this message]
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