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 13:37:48 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!chcgil2-snh1.gtei.net!news.gtei.net!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Variant Record Component References: <3E5D00D6.F6A20AD2@boeing.com> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1046295467 12.234.13.56 (Wed, 26 Feb 2003 21:37:47 GMT) NNTP-Posting-Date: Wed, 26 Feb 2003 21:37:47 GMT Organization: AT&T Broadband Date: Wed, 26 Feb 2003 21:37:47 GMT Xref: archiver1.google.com comp.lang.ada:34628 Date: 2003-02-26T21:37:47+00:00 List-Id: > 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? Do you mean a situation with a non-simple "case" like: type r(v : integer) is record case v is when 0 => a:integer; when 1 | 2 | 3 => b:integer; when others => null; end case; end record; where you would essentially have to replicate the "case" statement, and you would rather just ask "if x.b exists"?