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,1ca6e1940d239274 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-19 19:53:40 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3BD0E769.22FC05DC@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Exactly the prblem, how do we make a known constant value static? References: <3BCDA15C.2976AF2@icn.siemens.de> <3BCDB1B0.52D3B04C@icn.siemens.de> <9qmbk4$jhb$1@newstoo.ericsson.se> <3BCF0D06.DD1D45F6@boeing.com> <9qp9ta$1pc$1@newstoo.ericsson.se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 20 Oct 2001 02:53:38 GMT NNTP-Posting-Host: 158.252.147.31 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1003546418 158.252.147.31 (Fri, 19 Oct 2001 19:53:38 PDT) NNTP-Posting-Date: Fri, 19 Oct 2001 19:53:38 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Fri, 19 Oct 2001 19:49:56 PDT (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:14953 Date: 2001-10-20T02:53:38+00:00 List-Id: Petter Fryklund wrote: > > Sure, my mistake. It would have been correct if we had been working on > bytes, but still, how do we make a rep spec? Since the array's size depends on a generic parameter, there is no way to obtain a static size for the array to use in a rep spec. The only way is to specify the components that come before the array, pack the record, and hope the compiler positions everything where you need it. > > My_Array_Length : constant Integer := Integer ((Indices'Last - > Indices'First + 1) * 4 * 8); If Integer'Size is 32, this is the same as My_Array'Size. -- Jeff Carter "English bed-wetting types." Monty Python & the Holy Grail