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,eb64de1902329f4f X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: Record -> Array in Ada Date: 1996/08/20 Message-ID: <321A2A00.167EB0E7@escmail.orl.mmc.com>#1/1 X-Deja-AN: 175385568 references: <321991BE.41C67EA6@mailgw.sanders.lockheed.com> content-type: text/plain; charset=us-ascii organization: Lockheed Martin Information Systems mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.0 (X11; I; SunOS 4.1.3_U1 sun4m) Date: 1996-08-20T00:00:00+00:00 List-Id: Mike Roske wrote: > What's the best way to split the record into 16-bit slices for > transmission? > > I have identified the following options: > > 1) Unchecked_Conversion into a fixed size array. (And if I do this, how > do I get the array bounds set correctly?) > > 2) Pass Record'Address and Record'Size into a subprogram. Inside the > subprogram, declare an array of the appropriate size, located at the > appropriate address. (have prototyped this one, and it works.) > > 3) Ask in c.l.a for suggestions. (hi there!) > Why not do all three? :-) Simply merge approaches 1 and 2 (and you are already doing 3). Set the array type's size to be (Record'size + 7)/8 bytes. -- T.E.D. | Work - mailto:dennison@escmail.orl.mmc.com | | Home - mailto:dennison@iag.net | | URL - http://www.iag.net/~dennison |