comp.lang.ada
 help / color / mirror / Atom feed
From: Mike Bishop <mbishop@ghgcorp.com>
Subject: Re: Alright, now for an Ada '95 question.
Date: 1996/08/15
Date: 1996-08-15T00:00:00+00:00	[thread overview]
Message-ID: <3213D46A.2404@ghgcorp.com> (raw)
In-Reply-To: 32134421.31CF@wpllabs.com


Tom Di Sessa wrote:
> 
> First of all, I want to thank the people who responded to my first(and
> rather unpolite) post.  Thank you.
> 
> In Java, I am able to do this comparison:
> (target is of Class(Type) Component, and Class Button is is derived from
> Component)
> 
> if (target instanceof Button) {...}
> 
> Now, is there a way to do this comparison in Ada '95, if target was of
> type Component'Class and Button was a derived type from Component?

The following comparisons can be done in Ada 95:

if target in Button then ...
if target in Component'class then ...

I don't know of a way to compare the types Button and Component in order
to determine if Button is derived from Component. That doesn't mean that
there is no way to do it, only that I don't know how to do it.

-- 
Mike Bishop         
mbishop@ghgcorp.com 
http://www.ghgcorp.com/mbishop/




  reply	other threads:[~1996-08-15  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-15  0:00 Alright, now for an Ada '95 question Tom Di Sessa
1996-08-15  0:00 ` Mike Bishop [this message]
1996-08-16  0:00   ` Jon S Anthony
1996-08-16  0:00   ` Mark A Biggar
1996-08-15  0:00 ` William W Pritchett
1996-08-16  0:00 ` Jon S Anthony
1996-08-16  0:00 ` Tucker Taft
replies disabled

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