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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ff63dd9ded39893d,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!postnews.google.com!k2g2000hse.googlegroups.com!not-for-mail From: ma740988@gmail.com Newsgroups: comp.lang.ada Subject: Array Syntax Date: Fri, 29 Feb 2008 07:19:06 -0800 (PST) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 192.91.172.42 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1204298347 30302 127.0.0.1 (29 Feb 2008 15:19:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 29 Feb 2008 15:19:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k2g2000hse.googlegroups.com; posting-host=192.91.172.42; posting-account=sobfpgkAAADijpnQisCvqN_d-m1lQV06 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.04506.30),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20146 Date: 2008-02-29T07:19:06-08:00 List-Id: Trying to garner a feel for Ada - while perusing texts - and I'm having slight difficulties understanding array syntax. Max_Num : constant := 6; type Pixel_Data is record Num_Of_Values : Int32; Is_Valid_Data : Boolean; end record; type Pixel_Number is Int16 range 1 .. Max_Num ; type Pixel_Data_Array is array ( Pixel_Number range 1 .. Max_Num ) of Pixel_Data; Pixel_Data_Array is an array 6 deep of composite type Pixel Data. So far so good? Now given: Frames_In_Buffer : constant := 35 ; Buffer_Pixel_Data : array ( Int32 range 1 .. Frames_In_Buffer ) of aliased Pixel_Data_Array ; >From the looks of this Buffer_Pixel_data is an array within an array. On paper I'm having a hard time representing this in part becuase I'm having a hard time understanding how a multi-dimensional array can have two separate types. IOW: I'm envisioning in C/C++ land: int Buffer_Pixel_Data [ 35 ] [ 6 ] Trouble is the 35 elements is of type Int32 and the 6 elements is of type Pixel Data. Then again, I'm sure I'm not deducing this right. Any help appreciated in clearing up my confusion. Thanks in advance.