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,9c8d43df5d883263 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-15 14:50:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!dispose.news.demon.net!news.demon.co.uk!demon!billybob.demon.co.uk!not-for-mail From: brianc@billybob.demon.co.uk (Brian A Crawford) Newsgroups: comp.lang.ada Subject: Re: Two Dimensional Array Date: Fri, 15 Feb 2002 22:50:43 GMT Message-ID: <3c6d8b32.18156525@news.demon.co.uk> References: <3c6cf3db.11214605@news.demon.co.uk> NNTP-Posting-Host: billybob.demon.co.uk X-NNTP-Posting-Host: billybob.demon.co.uk:194.222.76.2 X-Trace: news.demon.co.uk 1013813393 nnrp-02:17273 NO-IDENT billybob.demon.co.uk:194.222.76.2 X-Complaints-To: abuse@demon.net X-Newsreader: Forte Free Agent 1.11/32.235 Xref: archiver1.google.com comp.lang.ada:20063 Date: 2002-02-15T22:50:43+00:00 List-Id: On 15 Feb 2002 13:15:13 -0500, Stephen Leake wrote: >brianc@billybob.demon.co.uk (Brian A Crawford) writes: > >> I have a program to read two numbers at a time from a file and then >> use a two dimensional array to look at that reference to see if a >> number 1 or 0 in assigned to the cell referenced. >> > >Try this (I made the array smaller for simplicity): > >with Ada.Text_IO; use Ada.Text_IO; >procedure Misc_Array_Aggregate >is > subtype Firstevent is Integer range 1 .. 5; > subtype Secondevent is Integer range 1 .. 5; > type Two_Events_Type is array (Firstevent, Secondevent) of Integer; > > Event : Two_Events_Type := > (1 => (1 | 3 | 5 => 1, others => 0), > 2 => (2 | 4 => 1, others => 0), > others => (others => 0)); > >begin > Ada.Text_IO.Put_Line ("It works!"); >end Misc_Array_Aggregate; > >-- >-- Stephe Hi Stephen I have also experimented with your notation above. It is still too unweildly in a very large array that is not consecutive. To use your example the order would need to be be 3,1,2,5,4 for both firstevent and secondevent. My problem is the array is so big and is out of sequence. If I had to just place the ones and zeros in the array once only I would bite the bullet and get on with it. But I have to fine tune the placements 100 of times. The consistent thing however is if I could define the array out of sequence the groups of 1's and 0's would be in small groups of 5 numbers (not consequtive numerically but consequtively placed. To use your example again 3,1,2 ; 1,2,5 and 2,5,4 etc would be the small groupings inside the array. The fact that it is so big is the headache. Then I may be able to call the 1,2,5 : AN and the 2,5,4 :BN etc,and just fine tune by moving the AN's and BN's etc around like a kind of shorthand for each block of 1's ,defining others=> 0. Regards Brian