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-Thread: 103376,ff63dd9ded39893d X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Array Syntax References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <3CXxj.2617$TT4.412@attbi_s22> NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1204307455 12.201.97.213 (Fri, 29 Feb 2008 17:50:55 GMT) NNTP-Posting-Date: Fri, 29 Feb 2008 17:50:55 GMT Organization: AT&T ASP.att.net Date: Fri, 29 Feb 2008 17:50:55 GMT Xref: g2news1.google.com comp.lang.ada:20154 Date: 2008-02-29T17:50:55+00:00 List-Id: ma740988@gmail.com wrote: > > 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 ; This is not valid. You either want a subtype, a derived type ("new Int16"), or just a type ("is range"). > type Pixel_Data_Array is array > ( Pixel_Number range 1 .. Max_Num ) > of Pixel_Data; This can just be type Pixel_Data_Array is array (Pixel_Number) of Pixel_Data; Normally, unless you're doing something where you need to match the HW, you should avoid types such as those implied by Int16 and Int32. Array indices are not such a case, so you'd probably be better off with type Pixel_Number is range 1 .. Max_Num; and type Frame_Number is range 1 .. Frames_In_Buffer; -- Jeff Carter "I like it when the support group complains that they have insufficient data on mean time to repair bugs in Ada software." Robert I. Eachus 91