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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d23a9c52d1958b6a X-Google-Attributes: gid103376,public From: Doug Rogers Subject: Re: Problem to dramatize packed-array/rep-clause difficulties Date: 1996/03/27 Message-ID: <4jce00$t75@ra.nrl.navy.mil>#1/1 X-Deja-AN: 144504740 references: <4jaun6$st6@news2.delphi.com> content-type: text/plain; charset=us-ascii organization: Naval Research Laboratory x-url: news:4jaun6$st6@news2.delphi.com mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 1.1N (X11; I; Linux 1.3.69 i486) Date: 1996-03-27T00:00:00+00:00 List-Id: > for High_Res_Data use record > a at 0 range 0 .. 8; > b at 1 range 1 .. 9; > c at 2 range 2 .. 10; > d at 3 range 3 .. 11; > e at 4 range 4 .. 12; > f at 5 range 5 .. 13; > g at 6 range 6 .. 14; > h at 7 range 7 .. 15; > end record; > for High_Res_Data'size use 72; While I use this technique on small arrays, it's not easily expanded to my real application, which has hundreds of these items, each of which is a two-component record totalling 9 bits. And I must handle other arrays (not the Ada keyword, 'cause I wouldn't want to specify the solution instead of the problem, huh, RD? ;-) of weird record sizes (homogeneous within the array). As Robert Dewar pointed out in a private message, I didn't specify this well enough. If I must, I will employ this kind of record on a grand (pardon the pun) scale, with "case" statements everywhere, etc. Not elegant, but it definitely stays within the realm of Ada83. Thanks for your input. dr