From: jsa@alexandria (Jon S Anthony)
Subject: Re: Alright, now for an Ada '95 question.
Date: 1996/08/16
Date: 1996-08-16T00:00:00+00:00 [thread overview]
Message-ID: <JSA.96Aug16153702@alexandria> (raw)
In-Reply-To: 3213D46A.2404@ghgcorp.com
In article <3213D46A.2404@ghgcorp.com> Mike Bishop <mbishop@ghgcorp.com> writes:
> 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.
I don't think you can do this directly as 4.4(8) rules out first named
subtype names as being names used in memebership tests and I don't see
any such tests specific to types.
The obvious hack would be:
declare
x : Button;
begin
if Button'Class(x) in Component'Class then ... end if;
end;
/Jon
--
Jon Anthony
Organon Motives, Inc.
1 Williston Road, Suite 4
Belmont, MA 02178
617.484.3383
jsa@organon.com
next prev parent reply other threads:[~1996-08-16 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
1996-08-16 0:00 ` Jon S Anthony [this message]
1996-08-16 0:00 ` Mark A Biggar
1996-08-15 0:00 ` William W Pritchett
1996-08-16 0:00 ` Tucker Taft
1996-08-16 0:00 ` Jon S Anthony
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox