Re: 32bit to 64bit conversion [message #36056] |
Wed, 06 August 2003 22:07  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Tapuosi Lotoaniu <lotoaniu@atmos.ucla.edu> writes:
> Hi all,
>
> I have data in the form big endian 32 bit positive integer (31 bit data
> with extra most significant bit set to zero). I want to import this data
> into idl 5.5 running on a sunblade 64 bit Unix machine.
>
> The IDL code (written for 32 bit PC) seems to work fine if the data is
> positive but the negative values are not coming out right.
If you have all positive integers (see 1st paragraph), then why are
concerned about negative values? (see 2nd paragraph).
Since IDL data types have a specific byte-size, I think you should be
able to read a LONG integer generated on one machine into another
machine, regardless of the native processor word size. Of course, you
should open the file with the correct endianness keywords to OPENU.
Good luck,
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
Re: 32bit to 64bit conversion [message #36184 is a reply to message #36056] |
Wed, 13 August 2003 01:30  |
Tapuosi Lotoaniu
Messages: 9 Registered: June 2003
|
Junior Member |
|
|
The real data values can be +/- float, integer, etc .. However the
data are stored to file only as 32 bit +ve integers. Anyway it does not
matter cause I worked it out.
On 7 Aug 2003, Craig Markwardt wrote:
>
> Tapuosi Lotoaniu <lotoaniu@atmos.ucla.edu> writes:
>
>> Hi all,
>>
>> I have data in the form big endian 32 bit positive integer (31 bit data
>> with extra most significant bit set to zero). I want to import this data
>> into idl 5.5 running on a sunblade 64 bit Unix machine.
>>
>> The IDL code (written for 32 bit PC) seems to work fine if the data is
>> positive but the negative values are not coming out right.
>
> If you have all positive integers (see 1st paragraph), then why are
> concerned about negative values? (see 2nd paragraph).
>
> Since IDL data types have a specific byte-size, I think you should be
> able to read a LONG integer generated on one machine into another
> machine, regardless of the native processor word size. Of course, you
> should open the file with the correct endianness keywords to OPENU.
>
> Good luck,
> Craig
>
> --
> ------------------------------------------------------------ --------------
> Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
> Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
> ------------------------------------------------------------ --------------
>
>
|
|
|