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,ef01efac83f51e2e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-18 09:51:42 PST From: "Stephen Frackelton" Newsgroups: comp.lang.ada References: <3c96047c$1@pull.gecm.com> <3C960A83.C2A1E9E1@otelco.net> Subject: Re: looping through variable length array Date: Mon, 18 Mar 2002 17:47:38 -0000 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 NNTP-Posting-Host: 172.31.31.128 Message-ID: <3c962806$1@pull.gecm.com> X-Trace: 18 Mar 2002 17:46:46 GMT, 172.31.31.128 Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!62.24.128.9.MISMATCH!news-1.opaltelecom.net!newsfeed.icl.net!newsfeed.wirehub.nl!dispose.news.demon.net!demon!btnet-peer0!btnet-feed5!btnet!newreader.ukcore.bt.net!pull.gecm.com!172.31.31.128 Xref: archiver1.google.com comp.lang.ada:21416 Date: 2002-03-18T17:47:38+00:00 List-Id: i would be using 'range anyway the problem is the array size is variable, i have many declared arrays of various sizes and wish to write one looping process to cater for all, obviously i cannot loop through the array name as this only caters for that instance of the array thanks Stephen "Larry Hazel" wrote in message news:3C960A83.C2A1E9E1@otelco.net... > Stephen Frackelton wrote: > > > > i'm attempting to loop through a set of arrays, but theses arrays are of > > different lengths to cater for various message sizes. > > but i want to write the loop only once to cater for this. > > how is the best way to model this ? > > > > can i somehow use an unconstrained array ? > > > > if i have my data available in a fixed size array, how can i get this > > variable into a format i can loop through, regardless of the size of the > > array. > > Knowing the number of items in the array, just loop from > array_name'first .. array_name'first + number_items - 1 > and you may know that array_name'first is 1, so you can loop from 1 .. > number_items. > > I'm a bit confused by "loop through a set of arrays". > > Larry