comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Pack a Float into Bytes
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Pack a Float into Bytes [message #76433] Thu, 02 June 2011 11:45 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <MPG.28514fa26bc10c4d9898fd@news.giganews.com>,
David Fanning <news@idlcoyote.com> wrote:

> Folks,
>
> Does anyone know off-hand how you would pack a floating point
> value into four bytes of information and then read it back
> again? (Actually, I think I know how to use the FLOAT function
> on a byte array to read the data back into a float, but
> I don't readily recall how to pack the float into the byte
> array to begin with. And I have no time this morning to
> puzzle it out.)
>
> Thanks!
>
> Cheers,
>
> David

Can you elaborate? A FLOAT is 4 bytes of data.

You can just write it unformatted. Is that what you mean?

Ken
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL 8 on a Laptop
Next Topic: Re: IDL 8 on a Laptop

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:54:28 PDT 2025

Total time taken to generate the page: 0.00456 seconds