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 07:37:59 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sunqbc.risq.qc.ca!falcon.america.net!eagle.america.net.POSTED!not-for-mail Message-ID: <3C960A83.C2A1E9E1@otelco.net> From: Larry Hazel X-Mailer: Mozilla 4.78 [en] (Win98; U) X-Accept-Language: en,x-ns11F8K63r3NhQ,x-ns2r2e09OnmPe2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: looping through variable length array References: <3c96047c$1@pull.gecm.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 18 Mar 2002 09:40:51 -0600 NNTP-Posting-Host: 66.0.32.230 X-Trace: eagle.america.net 1016465873 66.0.32.230 (Mon, 18 Mar 2002 10:37:53 EST) NNTP-Posting-Date: Mon, 18 Mar 2002 10:37:53 EST Organization: 24hoursupport.com Xref: archiver1.google.com comp.lang.ada:21408 Date: 2002-03-18T09:40:51-06:00 List-Id: 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