comp.lang.ada
 help / color / mirror / Atom feed
From: Michal Nowak <vinnie@inetia.pl>
Subject: Re: Bug in GNAT?
Date: Sat, 09 Nov 2002 13:26:03 +0100
Date: 2002-11-09T13:26:03+01:00	[thread overview]
Message-ID: <mailman.1036844282.626.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: <3dcce11d$0$307$bed64819@news.gradwell.net>

On 2002-11-09 at 15:01 porton@ex-code.com wrote:

[snip]
>> The function F is returning an object of type Integer. 
>> So, if you invoke F(3) you get an object in result and then
>> you rename it to Y. 
>> Feeling beteer? :-)
>
>But this compiles with an error:
>
>function F(A: Integer) return Integer is begin return 1; end;
>Y: Integer renames F(3)+2;
>
>What is the difference?

I'm not an Ada guru yet, but I think that what you written above
is a renaming of a compound expression ( F(3)+2 ) and there is
no such feature in Ada. As I am not sure if my expalantion is 
right this time, I hope we get answer from somebody who is better
is this subject.

Michal


-- -----------------------------------------------------------------
--   ___        _
--  / _ \      | |                      I Choose Ada:
-- | |_| |  ___| |   _____   The Most Trusted Name in Software (TM)
-- |  _  | | __  |  | __  | 
-- |_| |_| |_____|_ |_____|_ http://www.adaic.org/whyada/choose.html
--
-- -----------------------------------------------------------------




  reply	other threads:[~2002-11-09 12:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-09  6:56 Bug in GNAT? Victor Porton
2002-11-09  9:43 ` Michal Nowak
2002-11-09 10:01 ` Victor Porton
2002-11-09 12:26   ` Michal Nowak [this message]
2002-11-09 15:26   ` David C. Hoos, Sr.
2002-11-09 15:31   ` 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