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,514627f9964b6e38 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Using the GNAT defined attribute: 'Enum_Rep Date: 1997/09/08 Message-ID: #1/1 X-Deja-AN: 270766342 References: <97082719523509@psavax.pwfl.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-09-08T00:00:00+00:00 List-Id: In article <97082719523509@psavax.pwfl.com>, Marin David Condic, 561.796.8997, M/S 731-96 wrote: > The ARM suggests using Unchecked_Conversion to get from here to > there, but now you've got to create an integer type that is the > same size as the enumerated type. Here's a code fragment: How about: type Temp_Integer is range 0..2**User_Types.CL_Evt_Status'Size; and use Temp_Integer'Base? Or: type Temp_Integer is mod User_Types.CL_Evt_Status'Size; ? - Bob