> -----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