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: "W. Wesley Groleau x4923" Subject: Re: Using the GNAT defined attribute: 'Enum_Rep Date: 1997/09/08 Message-ID: <34147DAB.463@pseserv3.fw.hac.com>#1/1 X-Deja-AN: 270814655 Sender: usenet@most.fw.hac.com (News Administration) X-Nntp-Posting-Host: sparc02 References: <97082719523509@psavax.pwfl.com> <340D6C5D.2E53@pseserv3.fw.hac.com> Organization: Hughes Defense Communications Newsgroups: comp.lang.ada Date: 1997-09-08T00:00:00+00:00 List-Id: Robert A Duff wrote: > In article <340D6C5D.2E53@pseserv3.fw.hac.com>, > W. Wesley Groleau x4923 wrote: > >... And in Ada 83, the above > >would not be legal because 'Size is _defined_ as non-static, thus > >can't be used to specify another 'Size. > > >> 'Pos and 'Val. ... will work If and only if the representation is > >> identical to the position numbers - what you get if you don't > >> specify a representation. .... > >Is this true ? > Yes. Note, I asked "is it true that the representation is identical to the position numbers if you don't specify a rep" so by the rest of your post the answer appears to be "not necessarily" > >I can imagine a CPU where a bit per value is more efficient, i.e., > >an implicit > > > > for Enum use ( 0, 1, 2, 4, 8, 16, 32, ... ); > > Fine, but the 'Pos values are still 0, 1, 2, 3, ... > >though, again, I've never seen that done. > > Me neither. We probably never will, either. Nevertheless, I will never write logic that depends on _any_ internal representation unless _I_ or the RM specified that representation. (Even though you and Dewar both said the ACVC forces the answer to be "yes, it is true") -- ---------------------------------------------------------------------- Wes Groleau, Hughes Defense Communications, Fort Wayne, IN USA Senior Software Engineer - AFATDS Tool-smith Wanna-be wwgrol AT pseserv3.fw.hac.com Don't send advertisements to this domain unless asked! All disk space on fw.hac.com hosts belongs to either Hughes Defense Communications or the United States government. Using email to store YOUR advertising on them is trespassing! ----------------------------------------------------------------------