comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@alexandria (Jon S Anthony)
Subject: Re: ObjectAda vs Gnat -- bugs
Date: 1997/05/16
Date: 1997-05-16T00:00:00+00:00	[thread overview]
Message-ID: <JSA.97May16150919@alexandria> (raw)
In-Reply-To: 337B65FC.98D@gsfc.nasa.gov


In article <337B65FC.98D@gsfc.nasa.gov> Stephen Leake <Stephen.Leake@gsfc.nasa.gov> writes:

> > It compiles without any error with ObjectAda.
> > With gnat3.09, I have the following errors:
> > 
> > rgbcolor.ads:18:41: expect object name in renaming
> > rgbcolor.ads:19:49: expect object name in renaming
> > 
> > Which of the compilers is correct ?
> 
> gnat; see below

Not true, mon ami!

> An enumeration literal acts like a function with no parameters, so you
> can rename it as a function. Your original renaming was trying to
> declare an object, which GNAT correctly forbids; submit an error report
> to Aonix!

Change "Anonix" to "ACT"...

Ada95 sez that function results are "constant objects" and so can be
renamed.  This is really useful when you are dealing with limited
types which can be returned from functions - but not assigned!

/Jon

-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com





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

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-15  0:00 ObjectAda vs Gnat -- bugs granger
1997-05-15  0:00 ` Samuel A. Mize
1997-05-15  0:00 ` Samuel A. Mize
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-15  0:00 ` Stephen Leake
1997-05-16  0:00   ` Jon S Anthony [this message]
1997-05-16  0:00   ` Tucker Taft
1997-05-16  0:00     ` Jon S Anthony
1997-05-16  0:00       ` Robert Dewar
1997-05-17  0:00         ` Jon S Anthony
1997-05-16  0:00       ` Tom Moran
1997-05-16  0:00 ` Robert A Duff
1997-05-16  0:00   ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1997-05-16  0:00 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
1997-05-24  0:00     ` Robert A Duff
1997-05-28  0:00       ` Stephen Leake
1997-05-30  0:00         ` Samuel Mize
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-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-30  0:00 John Walker
replies disabled

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