comp.lang.ada
 help / color / mirror / Atom feed
* Type convertion
@ 2008-03-11 16:10 news.broadpark.no
  2008-03-11 16:59 ` Ed Falis
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: news.broadpark.no @ 2008-03-11 16:10 UTC (permalink / raw)


I have a simple question. I'm working on an Ada package I have received.

- Is it possible to covert a Boolean to Integer in an easy way
- Is it possible to covert an enum to Integer in an easy way

In the second question i typically have something like this:

   type My_Type is  (AB, CD, EF, GH, IJ);

Now, I have a declaration:

   MyTest : My_Type;

The result is stored in MyTest. I'm writing an interface to a C based 
program and I need to convert it to Integer. I'm new to Ada, so any hint 
would help.

Eirik




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

end of thread, other threads:[~2008-03-24  2:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-11 16:10 Type convertion news.broadpark.no
2008-03-11 16:59 ` Ed Falis
2008-03-11 20:45   ` Ludovic Brenta
2008-03-12 20:36     ` Simon Wright
2008-03-12 20:45       ` Ludovic Brenta
2008-03-13  8:33         ` Maciej Sobczak
2008-03-24  2:14           ` David Thompson
2008-03-11 17:39 ` Jeffrey R. Carter
2008-03-11 20:53   ` news.broadpark.no
2008-03-11 21:40     ` Ludovic Brenta
2008-03-11 17:49 ` Stuart
2008-03-11 20:56   ` news.broadpark.no

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