comp.lang.ada
 help / color / mirror / Atom feed
From: Phillip Durbin <durbin@killians.gsfc.nasa.gov>
Subject: Dispatching and different types
Date: 1997/07/11
Date: 1997-07-11T00:00:00+00:00	[thread overview]
Message-ID: <33C657C5.41C6@killians.gsfc.nasa.gov> (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




             reply	other threads:[~1997-07-11  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-11  0:00 Phillip Durbin [this message]
1997-07-11  0:00 ` Dispatching and different types Phillip Durbin
replies disabled

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