TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
X-To: Ed Colbert <[log in to unmask]>
Date: Mon, 26 Nov 2001 22:12:31 -0800
Reply-To: Mark Lundquist <[log in to unmask]>
From: Mark Lundquist <[log in to unmask]>
Content-Transfer-Encoding: 7bit
In-Reply-To: <000401c176da$e1b5a310$0500005a@brandywine>
Content-Type: text/plain; charset="iso-8859-1"
MIME-Version: 1.0
Parts/Attachments: text/plain (53 lines)
> -----Original Message-----
> From: Team Ada: Ada Advocacy Issues (83 & 95)
> [mailto:[log in to unmask]]On Behalf Of Ed Colbert
> Sent: Monday, November 26, 2001 4:32 PM
> To: [log in to unmask]
> Subject: FW: Dispatching Example
>
>
> Hi All,
>
> About 3 months I posted a question on comp.lang.ada.  Tucker responded.
> I posted some follow up questions, but never saw a response.  I hope
> that Tucker or someone on this mail list might be able to answer my
> questions.
>[...]
> Why is the expression ambiguous?

Because Is_Item is overloaded and each one is an "acceptable interpretation"
[RM 8.6].

> Isn't the tag of C, which in this
> case is compile time determinable, used to resolve the call to Is_Item
> per 5.2(9)?
>
> I suppose it could be ambiguous if the expression is evaluated first
> as allowed by 5.2(7); but then when would 5.2(8-10) apply?

That doesn't make sense -- there's no expression to evaluate (at run time)
because the construct is illegal.

>
> Clearly, something is confusing Richard & I.
>

It sounds as though you're confusing overload resolution with the
determination of the controlling tag.

Overload resolution determines which operation is denoted by the call.

The controlling tag determines which subprogram_body is executed for that
operation.

The way it goes is that the overloading rules are applied, then the
non-overloading rules.  You have to have exactly one acceptable
interpretation for a construct.  If you make it that far, then you get to
find out if that interpretation is legal (with respect to the
non-overloading rules).  The way it *doesn't* work is, "exactly one legal
interpretation".

Hope this helps,
Mark Lundquist
http://members.home.com/mlundquist2/consulting

ATOM RSS1 RSS2