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=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,48b3e9df2fd37d9d X-Google-Attributes: gid103376,public From: WishList@2600.com (Technobabble) Subject: Re: unconstrained array clarification Date: 1998/09/19 Message-ID: #1/1 X-Deja-AN: 392780190 References: Organization: WannaBeACracker NNTP-Posting-Date: Sat, 19 Sep 1998 10:47:23 MDT Newsgroups: comp.lang.ada Date: 1998-09-19T00:00:00+00:00 List-Id: Greetings Tucker, Thanks for the excellent response to my problem. Thanks also for being kind enough to see through my novice attempts at syntax and patient enough to really understand and attack this problem. I'm sorry for the late night off the cuff coding examples that introduced misleading errors and produced a frustrated audience, it's all my fault, sorry. Thanks for seeing through all of that !!! recall: > xyz5_array : aliased xyz_array := (1..5 => 0); > > This requirement for subtype matching is a bit of a pain, but using 'Access > imposes some stringent requirements on matching of representation, and > for pointers to arrays, it can matter greatly whether the nominal > subtype is constrained or unconstrained (you'll have to trust me on > this one). > > : now I want to loop: > > : for I in This.XYZ(1)'RANGE > : loop > : .......... > > > : ???? Will this work ??? Is the syntax totally incorrect ??? > > This can be made to work, with the above changes. > > It might be interesting to have some idea where you are headed > with all of this. There might be a simpler overall solution. > What I want to do is to keep the addresses for several arrays of records of different lengths in an array of pointers. Then write the contents of each record to I/O. The problem is to do this with only the array of pointers, if I don't want to keep track of the size of each array (number of records), and I want to use the RANGE attribute to determine the size. But the only way I have of getting to the array of records is via the pointer. I didn't design this stuff either, it's adopted from legacy code. I'll re-code the stuff in GNAT with the changes you've supplied and see if I can get a good compile. Thanks, Richmond