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

Home » Public Forums » archive » print, long(1.0e10)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
print, long(1.0e10) [message #16541] Tue, 03 August 1999 00:00 Go to previous message
Gary Fu is currently offline  Gary Fu
Messages: 9
Registered: April 1997
Junior Member
Hi,

I got different results from the following example on SGI IRIX and PC
Linux:
a = 1.0e10
b = long(a)
print, b ; 2147483647 for IRIX, -2147483648 for Linux

It looks like that IRIX and Linux handle it differently when assigning a
floating value greater (or less) than the boundary of a long integer to
a long variable. Should I always check the range of 'a' before
assigning it to a 'long' variable to make the result consistent on IRIX
and Linux ?

TIA,

Gary
--

*****************************************
* Gary Fu, GSC (301) 286-7107 *
* email : "gfu@seadas.gsfc.nasa.gov" *
* NASA/Goddard Space Flight Center *
*****************************************
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL> WHY IS THIS A NULL FILENAME
Next Topic: Re: transfering data files

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

Current Time: Wed Oct 22 18:14:55 PDT 2025

Total time taken to generate the page: 0.68605 seconds