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

Home » Public Forums » archive » byteoder for float numbers conversion
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: byteoder for float numbers conversion [message #8216 is a reply to message #8071] Tue, 18 February 1997 00:00 Go to previous messageGo to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
William Connolley wrote:
> In article n98@elaine44.Stanford.EDU, yafeng@leland.Stanford.EDU (Meili Zhong) writes:
>> I want to convert the float numbers from UNIX format(big-edian)
>> to PC format(small-edian).
>> None of these commands worked:
>> byteorder, data
>> byteorder, data, /xdrtof
>> byteorder, data, /ftoxdrt
> To go from SUN-floating-point to DECalpha-floating-point I use
> byteorder,data,/lswap

SWAP_ENDIAN works for me, e.g.

data = swap_endian( temporary( data ) )

It handles floating point as well as integer types.

Cheers,
Liam.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Calling C routines
Next Topic: Re: Constructing Color Tables in IDL

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

Current Time: Fri Oct 10 01:39:44 PDT 2025

Total time taken to generate the page: 0.47994 seconds