[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'ffff'x is negative in 5.2 positive in 5.2.1



Karri Kaksonen (karri.kaksonen@picker.fi) writes:

> I just upgraded an Alpha Windows NT workstation to run
> version 5.2 of IDL.
> 
> The old versions of IDL treated 'ffff'x as a positive number.
> In version 5.2 for the Alpha it is negative and in 5.2.1 for
> Intel it is positive again.
> 
> print, 11 gt 'ffff'x
> 
> A bit confusing... I wonder what other implications this may
> have on peoples software.

Indeed, this "anomaly" was introduced with the change to
unsigned integers in IDL 5.2. It's previous behavior was
fixed in IDL 5.2.1. But one could argue that since this
is a long integer, it should really be written correctly
like this anyway:

   print, ll gt 'ffff'xL

This works correctly under both versions of IDL. :-)

Cheers,

David

-- 
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155