Relational Operators on Windows [message #71565] |
Fri, 25 June 2010 17:47 |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
Sometimes as shortcut for explicitly testing for NaN values, I use the
fact that NaN is never less than, equal to, or more than a numeric
value. So if I need to get the values less than 3 in the following
array
a = [3.2, !VALUES.F_NAN, 2]
I simply say
a = a [ where(a lt 3) ]
and the NaN values are excluded along with the values larger than
3. This works fine on Linux and Mac OSX. But someone pointed me
to the IDL help on relational operators which says,
"On the Windows platform, using relational operators with the values
infinity or NaN (Not a Number) causes an "illegal operand" error."
Unfortunately, neither of us has access to a Windows machine. Does
one really get an "illegal operand" value on Windows with the above
code (so that I need to use the FINITE() function)? Thanks, --Wayne
|
|
|