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,d0452dbe16ac0df4 X-Google-Attributes: gid103376,public From: jsa@alexandria (Jon S Anthony) Subject: Re: ObjectAda vs Gnat -- bugs Date: 1997/05/16 Message-ID: #1/1 X-Deja-AN: 241979170 Distribution: world References: <5lf6ka$nbg@service.polymtl.ca> <337B65FC.98D@gsfc.nasa.gov> Organization: PSI Public Usenet Link Newsgroups: comp.lang.ada Date: 1997-05-16T00:00:00+00:00 List-Id: In article <337B65FC.98D@gsfc.nasa.gov> Stephen Leake 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