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 X-Google-Thread: 103376,1ca6e1940d239274 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-17 14:31:36 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.25.12.36!oleane.net!oleane!setranews.setra.fr!not-for-mail From: Claude SIMON Newsgroups: comp.lang.ada Subject: Re: unconstrainted arrays Date: Wed, 17 Oct 2001 18:09:26 +0200 Organization: SETRA - CTOA Message-ID: <3BCDAD35.BE53D854@setra.fr> References: <3BCDA15C.2976AF2@icn.siemens.de> NNTP-Posting-Host: calamar.setra.fr Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: setranews.setra.fr 1003334825 26625 161.48.101.33 (17 Oct 2001 16:07:05 GMT) X-Complaints-To: usenet@setranews.setra.fr NNTP-Posting-Date: 17 Oct 2001 16:07:05 GMT X-Mailer: Mozilla 4.7 [fr] (WinNT; I) X-Accept-Language: fr Xref: archiver1.google.com comp.lang.ada:14846 Date: 2001-10-17T16:07:05+00:00 List-Id: Alfred Hilscher a �crit : > Hi, > > I know that I can define unconstrainted array where the actual > constraints are given later: > > type My_Array is array (<>) of Integer; > > A1 : My_Array (1..10); > > Moreover I know a way to use this with structure: > > type s (len : integer) is record > X,Y : Integer; > A : My_Array (1..Len); > end record; > > PTs : s (10); > > But this would add one extra component to the record (Len). Is there a > way to avoid this extra component ? Maybe a pragma or rep-specs ? Its > encapsulated within a package body for HW handling where the extra > component is unwanted. One way is : generic type Indices is range <>; package Structure is type My_Array is array (Indices) of Integer; type S is record X,Y : Integer; A : My_Array; end record; end Structure; Claude Simon