From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc656fd0afa65ff3 X-Google-Attributes: gid103376,public From: jsa@alexandria (Jon S Anthony) Subject: Re: Alright, now for an Ada '95 question. Date: 1996/08/16 Message-ID: #1/1 X-Deja-AN: 174924695 sender: news@organon.com (news) references: <32134421.31CF@wpllabs.com> <3213D46A.2404@ghgcorp.com> organization: Organon Motives, Inc. newsgroups: comp.lang.ada Date: 1996-08-16T00:00:00+00:00 List-Id: In article <3213D46A.2404@ghgcorp.com> Mike Bishop 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