comp.lang.ada
 help / color / mirror / Atom feed
* Enumerated types and attributes thereof?
@ 1998-04-17  0:00 Gerhard J. Feichtinger
  1998-04-17  0:00 ` Gerhard J. Feichtinger
  1998-04-18  0:00 ` Robert Dewar
  0 siblings, 2 replies; 3+ messages in thread
From: Gerhard J. Feichtinger @ 1998-04-17  0:00 UTC (permalink / raw)



Hey all,

I have a question.... (Ada 83)

Let's say you have TEST_TYPE (one, three, five) uses (one => 1,
three => 3, five => 5).

How can I, without using UNCHECKED_CONVERSION get an INTEGER 1,3,5
converted to the correct value of TEST_TYPE?

Can't do it using <'val>  TEST_TYPE'val(1) eval's to three.
Incidentally <'pos> is screwy  TEST_TYPE'pos(one) eval's to 0.

I probably am asking a silly question... 

Gerhard.
-- 
 Gerhard J. Feichtinger             gerhard.j.feichtinger@lmco.com  
 My opinions do not necessarily reflect those of Lockheed Martin FS.





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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-17  0:00 Enumerated types and attributes thereof? Gerhard J. Feichtinger
1998-04-17  0:00 ` Gerhard J. Feichtinger
1998-04-18  0:00 ` Robert Dewar

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