comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
Subject: Re: ObjectAda vs Gnat -- bugs
Date: 1997/05/23
Date: 1997-05-23T00:00:00+00:00	[thread overview]
Message-ID: <3385E9F1.2915@gsfc.nasa.gov> (raw)
In-Reply-To: EAAIBG.A7s@world.std.com


Robert A Duff wrote:
> 
> Keith Thompson wrote:
> >...
> >So, it is legal in Ada 95 (but illegal in Ada 83) to use an object
> >renaming declaration to rename an enumeration literal.
> 
> Ah, at least *somebody* knows the right answer.  ;-)
> 
> It seems to me that when so many people get the *wrong* answer (see
> below) ...

As one of the people who gave a wrong answer, perhaps I can contribute
(hopefully in a positive way :)

> When so many are wrong, including at least one compiler writer, it's
> probably a problem with the language, not with all those people.  The
> problem here, I think, is that enumeration literals are functions, in
> Ada, which is completely weird, given that string_literals and
> numeric_literals and null literals are just values.

Nope. My problem is that I knew the Ada 83 rule about enumeration
literals being functions, but missed the added capability of Ada 95 to
treat function results as objects (which was precisely GNAT's problem).
I've read Cohen's book, but either this particular issue isn't covered,
or I forgot it. I haven't read the whole rationale yet.

This is one reason why it is important to give references (to the
reference manual, and/or the rationale) when you say "Ada 95 lets you do
X". Those of us still learning need to go read the RM, to get more
familiar with it. Or provide a reference to a popular book.

I guess I should have qualified my post with "unless there's something
in Ada 95 I've missed" :)

-- 
- Stephe




  parent reply	other threads:[~1997-05-23  0:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-16  0:00 ObjectAda vs Gnat -- bugs Keith Thompson
1997-05-16  0:00 ` Robert A Duff
1997-05-16  0:00   ` Robert Dewar
1997-05-18  0:00     ` Nick Roberts
1997-05-19  0:00       ` Robert Dewar
1997-05-20  0:00         ` Nick Roberts
1997-05-21  0:00           ` Robert Dewar
1997-05-23  0:00   ` Stephen Leake [this message]
1997-05-24  0:00     ` Robert A Duff
1997-05-28  0:00       ` Stephen Leake
1997-05-30  0:00         ` Robert A Duff
1997-05-30  0:00           ` Matthew Heaney
1997-05-31  0:00             ` Robert A Duff
1997-05-30  0:00         ` Samuel Mize
  -- strict thread matches above, loose matches on Subject: below --
1997-05-30  0:00 John Walker
1997-05-19  0:00 tmoran
1997-05-19  0:00 ` Jon S Anthony
1997-05-20  0:00   ` Jeff Carter
1997-05-20  0:00   ` Nick Roberts
1997-05-25  0:00     ` Tom Moran
1997-05-15  0:00 granger
1997-05-15  0:00 ` Samuel A. Mize
1997-05-15  0:00 ` Samuel A. Mize
1997-05-15  0:00 ` Stephen Leake
1997-05-16  0:00   ` Jon S Anthony
1997-05-16  0:00   ` Tucker Taft
1997-05-16  0:00     ` Jon S Anthony
1997-05-16  0:00       ` Tom Moran
1997-05-16  0:00       ` Robert Dewar
1997-05-17  0:00         ` Jon S Anthony
1997-05-15  0:00 ` Robert Dewar
1997-05-16  0:00   ` David L Brown
1997-05-16  0:00     ` Robert Dewar
1997-05-17  0:00       ` Tom Moran
1997-05-18  0:00         ` Jon S Anthony
1997-05-19  0:00         ` Tucker Taft
1997-05-19  0:00       ` Tom Moran
1997-05-16  0:00 ` Robert A Duff
1997-05-16  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