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-27 00:17:26 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!uio.no!newsfeed.song.fi!nntp.inet.fi!central.inet.fi!inet.fi!read3.inet.fi.POSTED!53ab2750!not-for-mail From: "Anders Wirzenius" Newsgroups: comp.lang.ada References: <3E5D00D6.F6A20AD2@boeing.com> Subject: Re: Variant Record Component MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Thu, 27 Feb 2003 08:17:20 GMT NNTP-Posting-Host: 194.251.142.2 X-Complaints-To: abuse@inet.fi X-Trace: read3.inet.fi 1046333840 194.251.142.2 (Thu, 27 Feb 2003 10:17:20 EET) NNTP-Posting-Date: Thu, 27 Feb 2003 10:17:20 EET Organization: Sonera corp Internet services Xref: archiver1.google.com comp.lang.ada:34653 Date: 2003-02-27T08:17:20+00:00 List-Id: "Stephen Leake" wrote in message news:uof4y507a.fsf@nasa.gov... > 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 Sorry, John, for using your thread as a stepping-stone. ;-( Here, Stephe, is another higher level description: I HAVE: 1. Six phone numbers: 1795, 2006, 2007, 2012, 2013, 2014. 2. A log (text file) from the company's phone system with data like: From_Phone_Nr, To_Phone_Nr, Answering_Time, Duration... I WANT TO: 3. Pick only those log data where the To_Phone_Nr is one of the six numbers. 4. Set up some statistics about those phone calls. 5. Be able to add or remove phone numbers from the list (six becomes seven some sunny winterday). I WISH I HAD: type Help_Desk is (1795, 2006, 2007, 2012, 2013, 2014); -- with the dynamics described under point 5. If To_Phone_Nr in Help_Desk then -- Do statistics end if; What is a proper way to implement "To_Phone_Nr in Help_Desk" ? Anders