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,2e8cf506f89b5d0a,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-19 13:39:09 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!feed1-in.uncensored-news.com!news.alt.net!oz.net!usenet From: "M R Goodwin" Newsgroups: comp.lang.ada Subject: Looping over a tagged record? Date: 19 Jun 2001 20:39:05 GMT Message-ID: <9god9a$g04$0@208.164.98.151> NNTP-Posting-Host: 208.164.98.151 User-Agent: Pan/0.9.1 (Unix) X-No-Productlinks: Yes Xref: archiver1.google.com comp.lang.ada:8896 Date: 2001-06-19T20:39:05+00:00 List-Id: Hi! This is a part practical, and a part 'I wonder' type problem. I have a tagged record that is pretty big. Most, but not all of the elements in it are a bounded string type. Because I don't feel like the typing and all I would need to do to assign and later change values, I was wondering if there is anyway to loop over all elements in the record, checking their type and then taking the right action... type Big_record is tagged record a1 : String_60; a2 : String_60; n1 : Integer; ... a30 : String_60; end record; And I want to do something like: (And yes, I know its not Ada code!) For I in ?number of elements? loop if I is Integer then Blah, blah elsif I is String_60 Blah, Blah. end; I've been messing around with it, and have not come to any workable solution. Thanks for the help, Matthew