comp.lang.ada
 help / color / mirror / Atom feed
From: "W. Wesley Groleau x4923" <wwgrol@pseserv3.fw.hac.com>
Subject: Re: Using the GNAT defined attribute: 'Enum_Rep
Date: 1997/09/08
Date: 1997-09-08T00:00:00+00:00	[thread overview]
Message-ID: <34147DAB.463@pseserv3.fw.hac.com> (raw)
In-Reply-To: EG7Enp.3DF@world.std.com



Robert A Duff wrote:
> In article <340D6C5D.2E53@pseserv3.fw.hac.com>,
> W. Wesley Groleau x4923 <wwgrol@pseserv3.fw.hac.com> 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!
----------------------------------------------------------------------




  reply	other threads:[~1997-09-08  0:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-27  0:00 Using the GNAT defined attribute: 'Enum_Rep Marin David Condic, 561.796.8997, M/S 731-96
1997-09-03  0:00 ` W. Wesley Groleau x4923
1997-09-06  0:00   ` Robert Dewar
1997-09-08  0:00     ` Robert A Duff
1997-09-08  0:00     ` W. Wesley Groleau x4923
1997-09-08  0:00       ` Matthew Heaney
1997-09-08  0:00   ` Robert A Duff
1997-09-08  0:00     ` W. Wesley Groleau x4923 [this message]
1997-09-08  0:00       ` Matthew Heaney
1997-09-09  0:00         ` Robert A Duff
1997-09-11  0:00           ` Robert Dewar
1997-09-08  0:00 ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
1997-09-09  0:00 Marin David Condic, 561.796.8997, M/S 731-96
1997-09-09  0:00 ` W. Wesley Groleau x4923
1997-09-11  0:00   ` Robert Dewar
1997-09-09  0:00 Marin David Condic, 561.796.8997, M/S 731-96
1997-09-09  0:00 ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox