From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,STOX_REPLY_TYPE, STOX_REPLY_TYPE_WITHOUT_QUOTES,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,74b958f114ec4924,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "news.broadpark.no" Newsgroups: comp.lang.ada Subject: Type convertion Date: Tue, 11 Mar 2008 17:10:35 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18000 NNTP-Posting-Host: 223.80-202-137.nextgentel.com X-Original-NNTP-Posting-Host: 223.80-202-137.nextgentel.com Message-ID: <47d6ae9b$1@news.broadpark.no> X-Trace: news.broadpark.no 1205251739 80.202.137.223 (11 Mar 2008 17:08:59 +0100) Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!nntp.gblx.net!nntp3.phx1!news.broadpark.no!not-for-mail Xref: g2news1.google.com comp.lang.ada:20298 Date: 2008-03-11T17:10:35+01:00 List-Id: 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