comp.lang.ada
 help / color / mirror / Atom feed
* Re: Dispatching and different types
  1997-07-11  0:00 Dispatching and different types Phillip Durbin
@ 1997-07-11  0:00 ` Phillip Durbin
  0 siblings, 0 replies; 2+ messages in thread
From: Phillip Durbin @ 1997-07-11  0:00 UTC (permalink / raw)



I guess that should be Q(T,B) or Q(A,T) with Q(A,B) called from P.

Phillip Durbin wrote:
> can't dispatch P(T,B) or P(A,T) with P(A,B) because both A and B are
> derived types that are different. It seems to me it would be rather easy




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Dispatching and different types
@ 1997-07-11  0:00 Phillip Durbin
  1997-07-11  0:00 ` Phillip Durbin
  0 siblings, 1 reply; 2+ messages in thread
From: Phillip Durbin @ 1997-07-11  0:00 UTC (permalink / raw)



I am new to Ada and  was wondering, why doesn't Ada dispatching let you
use different inherited types? And of course how do you work  around
this ? For example if I have tagged type T, and two derived types A and
B (where A and B have different extensions) then procedure P(A,B) would
be  illegal, although P(T'CLASS,T'CLASS) is OK. The problem as I see it
is how do I get the functionality of P(A,B) from P(T'CLASS,T'CLASS),
when the operation to be performed needs both extensions of A and B. I
can't dispatch P(T,B) or P(A,T) with P(A,B) because both A and B are
derived types that are different. It seems to me it would be rather easy
to do a signature check to find the correct one. Am I missing some
obvious point here or is there some other feature in Ada that handles
this better?

 Phil Durbin
 durbin@killians.gsfc.nasa.gov




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-07-11  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-11  0:00 Dispatching and different types Phillip Durbin
1997-07-11  0:00 ` Phillip Durbin

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