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,a415d3a613d86a4e X-Google-Attributes: gid103376,public From: "James S. Rogers" Subject: Re: Ada Enumerations Date: 1997/12/03 Message-ID: <663j9f$e1l@mtinsc02.worldnet.att.net>#1/1 X-Deja-AN: 294826584 References: <662cs9$b34$1@newman.pcisys.net> Organization: AT&T WorldNet Services Newsgroups: comp.lang.ada Date: 1997-12-03T00:00:00+00:00 List-Id: Jeffrey Harris wrote in article <662cs9$b34$1@newman.pcisys.net>... > > NewLocation: Integer := DataTypes.LASTTYPE + 1; -- Newlocation = 101 > > The compiler isn't letting me do this. I've tried to use 'value, 'pos, and > 'val to no avail, how do I convert an Ada enumerated type into an integer value? The 'Pos attribute returns the position of the enumeration value. This is unaffected by the representation clause. To obtain the representation value you must instantiate Ada.Unchecked_Conversion. for your enumeration type. Jim Rogers Colorado Springs, Colorado