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

Home » Public Forums » archive » Re: array handling
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: array handling [message #52122 is a reply to message #52121] Sat, 06 January 2007 08:47 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Brian Larsen writes:

> Something I have always wondered is the difference between using
> finite() and just using ne?
>
> As an example:
> IDL> array = [ 1.0, 2.0, !Values.F_NAN, 4.0, !Values.F_NAN ]
> IDL> Print, Where( NOT Float( Finite(array) ) )
> 2 4
> IDL> print, where(array ne array)
> 2 4
>
> What is the fundamental difference here? Speed? Style? or something
> else entirely?

I don't know the answer, but I would guess the latter formulation
would lead some programmers to a general feeling of unease
regarding treating things that aren't numbers as if they were.
There are no hard and fast rules for such things, I don't think,
so you are at the mercy of programmers you don't know and
implementations that could, I guess, change in the future.

Plus, you get that damn "Arithmetic error: Floating illegal operation"
message when you try it. That generally causes a loss of confidence
among customers. :-(

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Recorrido a Espa�a
Next Topic: Re: Recorrido a España

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

Current Time: Fri Oct 10 06:18:40 PDT 2025

Total time taken to generate the page: 2.56328 seconds