comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Using the GNAT defined attribute: 'Enum_Rep
Date: 1997/09/09
Date: 1997-09-09T00:00:00+00:00	[thread overview]
Message-ID: <EG8w4J.Fn6@world.std.com> (raw)
In-Reply-To: mheaney-ya023680000809972005530001@news.ni.net


In article <mheaney-ya023680000809972005530001@news.ni.net>,
Matthew Heaney <mheaney@ni.net> wrote:
>Again, the RM does define internal representation, in RM95 13.4 (8).  See
>also paragraph 8a in the AARM.

Ah yes, I had forgotten about that paragraph.  Sorry for the
misinformation.

By the way, if I were designing a language from scratch, I would say
that the compiler can do whatever it likes in the absence of rep
clauses.  But I would provide an easy way to say you want the "obvious"
representation (which is (0, 1, 2, ...) for enums).  The problem with
Ada 83 was that you had to write a whole bunch of stuff to say you want
what you would get anyway, which is why 13.4(8) exists.  That problem
still exists for record_rep_clauses, for example, although "pragma
Convention(C);" comes close to what I want, here.

- Bob




  reply	other threads:[~1997-09-09  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
1997-09-08  0:00       ` Matthew Heaney
1997-09-09  0:00         ` Robert A Duff [this message]
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 ` Robert A Duff
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
replies disabled

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