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

Home » Public Forums » archive » Should SORT(Undefined) give an error message?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Should SORT(Undefined) give an error message? [message #93037] Wed, 13 April 2016 10:28 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
Currently one can SORT() an undefined variable without getting an error message

IDL> sort(undefined)
0

Certainly, the current result is inconsistent with the documentation:

"The result is always a vector of integer type with the same number of elements as Array." since in this case Array has 0 elements.


I think one should get an error message the same way one does with sqrt(undefined) or max(undefined)

In my case, the current behavior slowed down my debugging because I was using the sort index of Vector A to sort another vector B. Vector A was mistakenly undefined but Vector B was valid. Therefore, B[SORT(A)] was also valid, and the program happily proceeded. --Wayne
[Message index]
 
Read Message
Read Message
Previous Topic: Looping over odd values only
Next Topic: 3d Interpolation

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

Current Time: Wed Oct 08 13:38:56 PDT 2025

Total time taken to generate the page: 0.00431 seconds