comp.lang.ada
 help / color / mirror / Atom feed
From: "Adam Beneschan" <adam@irvine.com>
Subject: Re: Why does this work? (overloads)
Date: 7 Feb 2007 11:21:23 -0800
Date: 2007-02-07T11:21:23-08:00	[thread overview]
Message-ID: <1170876083.353327.155370@p10g2000cwp.googlegroups.com> (raw)
In-Reply-To: <nnpyh.382004$1i1.366090@attbi_s72>

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

                     -- Adam




  reply	other threads:[~2007-02-07 19:21 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 [this message]
2007-02-07 19:25     ` Adam Beneschan
2007-02-08  0:51       ` Jeffrey R. Carter
2007-02-07 23:12     ` Robert A Duff
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