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.3 required=5.0 tests=BAYES_00,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: dewarr@my-dejanews.com Subject: Re: unconstrained array clarification Date: 1998/09/19 Message-ID: <6u1anp$eo4$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 392828872 References: X-Http-Proxy: 1.0 x12.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.10 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sat Sep 19 22:20:41 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.02 [en] (WinNT; U) Date: 1998-09-19T00:00:00+00:00 List-Id: In article , WishList@2600.com (Technobabble) wrote: > 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 Seems odd that this could be legacy code, since Ada 83 had no facilities comparable to 'Access (at least not in reasonable coding styles). > -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum