comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Why does this work? (overloads)
Date: Wed, 07 Feb 2007 18:12:26 -0500
Date: 2007-02-07T18:12:26-05:00	[thread overview]
Message-ID: <wcczm7pimud.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 1170876083.353327.155370@p10g2000cwp.googlegroups.com

"Adam Beneschan" <adam@irvine.com> writes:

> On Feb 7, 11:02 am, "Jeffrey R. Carter" <jrcar...@acm.org> wrote:
>
>> You should be able to say
>>
>> V := T'(F) (5);
>>
>> to indicate a call to F1, but GNAT complains, saying a binary operator
>> is expected between ')' and '('. This seems to be a compiler error.
>> T'(F) should be a value of type T, which can then be indexed. After all,
>> you can say
>>
>> X : constant T := T'(F);
>>
>> V : Integer := X (5);
>
> No, the compiler is right.  The problem here is that the syntax of Ada
> says that an index can be applied to a "name", but a qualified
> expression is not a "name".  I griped about this in AI05-0003.  See
> http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AI05s/AI05-0003-1.TXT?
> rev=1.1

Right -- it's a language bug, not a compiler bug.

- Bob



  parent reply	other threads:[~2007-02-07 23:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-07  4:39 Why does this work? (overloads) Jerry
2007-02-07  6:45 ` AW: " Grein, Christoph (Fa. ESG)
2007-02-07  7:07   ` Jerry
2007-02-07  7:26     ` AW: " Grein, Christoph (Fa. ESG)
2007-02-07 20:43       ` Jerry
2007-02-07 19:09   ` AW: " Jeffrey R. Carter
2007-02-07 21:13     ` Jerry
2007-02-07 21:33       ` Ludovic Brenta
2007-02-07 21:36       ` Randy Brukardt
2007-02-07 19:02 ` Jeffrey R. Carter
2007-02-07 19:21   ` Adam Beneschan
2007-02-07 19:25     ` Adam Beneschan
2007-02-08  0:51       ` Jeffrey R. Carter
2007-02-07 23:12     ` Robert A Duff [this message]
2007-02-08  0:49     ` Jeffrey R. Carter
2007-02-07 20:53   ` Jerry
2007-02-08  0:53     ` Jeffrey R. Carter
2007-02-08 10:40       ` Jerry
2007-02-08 11:34         ` Georg Bauhaus
2007-02-08 12:05         ` AW: " Grein, Christoph (Fa. ESG)
2007-02-08 18:52         ` Jeffrey R. Carter
2007-02-09  0:56         ` Jerry
2007-02-09  1:27         ` tmoran
replies disabled

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