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 10:16:43 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Two Dimensional Array Date: 15 Feb 2002 13:15:13 -0500 Organization: NASA Goddard Space Flight Center Message-ID: References: <3c6cf3db.11214605@news.demon.co.uk> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1013797197 8229 128.183.220.71 (15 Feb 2002 18:19:57 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 15 Feb 2002 18:19:57 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: archiver1.google.com comp.lang.ada:20053 Date: 2002-02-15T18:19:57+00:00 List-Id: 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