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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e8550e5b10c2c0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-26 11:27:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Variant Record Component Date: 26 Feb 2003 14:08:41 -0500 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <3E5D00D6.F6A20AD2@boeing.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1046287355 27894 128.183.235.92 (26 Feb 2003 19:22:35 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 26 Feb 2003 19:22:35 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:34622 Date: 2003-02-26T19:22:35+00:00 List-Id: John Harbaugh writes: > Hi, all - > > Is there a way to determine if an object of some variant record type > contains a specific variant component, other than a trying it and > handling a possible constraint error? I looked for something like and > "in" operator or suitable attribute, but found nothing. The discriminant of a variant record tells you what components are present, but that information is essentially hard-coded everywhere. It sounds like you want to do introspection or something. ASIS is good for that, but not at run time. Perhaps if you give a higher level view of what you are trying to do, I could be more helpful. -- -- Stephe