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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3b24966551ccf2cd,start X-Google-Attributes: gid103376,public From: "Gerhard J. Feichtinger" Subject: Enumerated types and attributes thereof? Date: 1998/04/17 Message-ID: <3537A1F6.41C6@lmco.com>#1/1 X-Deja-AN: 345120373 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Organization: Lockheed Martin Federal Systems, Owego, NY Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-04-17T00:00:00+00:00 List-Id: 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.