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,4afd08be1096008a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-12 10:04:27 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!195.158.233.21!news1.ebone.net!news.ebone.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!zur.uu.net!ash.uu.net!xyzzy!nntp From: Jeffrey Carter Subject: Re: converting floats, ints byte arrays X-Nntp-Posting-Host: e246420.msc.az.boeing.com Content-Type: text/plain; charset=us-ascii Message-ID: <3B4DD1BF.42549471@boeing.com> Sender: nntp@news.boeing.com (Boeing NNTP News Access) Content-Transfer-Encoding: 7bit Organization: The Boeing Company X-Accept-Language: en References: <9ije24$9kg$1@fang.dsto.defence.gov.au> Mime-Version: 1.0 Date: Thu, 12 Jul 2001 16:35:11 GMT X-Mailer: Mozilla 4.5 [en]C-CCK-MCD Boeing Kit (WinNT; U) Xref: archiver1.google.com comp.lang.ada:9880 Date: 2001-07-12T16:35:11+00:00 List-Id: Vladimir Bednikov wrote: > > What I want is an array where the first C.C_Float'size bytes is the sample Remember that 'Size gives the size in bits, not bytes. To get the size in terms of your Byte type, you need to calculate (C.C_Float'Size + Byte'Size - 1) / Byte'Size -- Jeffrey Carter