[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
- Subject: Re: 'ffff'x is negative in 5.2 positive in 5.2.1
- From: davidf(at)dfanning.com (David Fanning)
- Date: Wed, 27 Oct 1999 06:05:18 -0600
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- References: <3816AD1C.EAAE30D5@picker.fi>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:16950
Karri Kaksonen (email@example.com) 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. :-)
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: firstname.lastname@example.org
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155