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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,74b958f114ec4924 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Type convertion References: <47d6ae9b$1@news.broadpark.no> <47d6f0e0@news.broadpark.no> Date: Tue, 11 Mar 2008 22:40:32 +0100 Message-ID: <874pbdszvz.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:8wntFI/er3mWguLFVCav4vU+q6E= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Tele2 X-Trace: DXC=BEVQ "news.broadpark.no" writes: > "Jeffrey R. Carter" wrote in message > news:XszBj.71283$yE1.45295@attbi_s21... >> news.broadpark.no wrote: >>> >>> - 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 >> >> Take a look at the 'Pos attribute, and its inverse, 'Val. >> > > Works fine. Thank you! I don't think this is the best solution. You don't really want to "convert to an int"; you want to "interface with C". The solution I gave earlier expresses that more cleanly. -- Ludovic Brenta.