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

Home » Public Forums » archive » Non-intuitive result with !Null in Where()
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Non-intuitive result with !Null in Where() [message #85610] Wed, 21 August 2013 09:42 Go to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
This is not what I expected. If there are no elements, how can "count" be non-zero? I was hoping that Where() would return !Null and "count" would be 0.

IDL> print, n_elements(!Null)
0
IDL> print, where(!Null ne 0, count)
0
IDL> print, count
1
IDL> print, where(!Null ne 0, count, /NULL)
0
IDL> print, count
1
IDL> print, !Null[0]
% Expression must be an array in this context: !NULL.
IDL> print, (!Null)[0]
% Variable is undefined: <UNDEFINED>.


The Where function is telling me I can access !Null at element 0, but I cannot.

IDL> print, !version
{ x86_64 darwin unix Mac OS X 8.0 Jun 17 2010 64 64}
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: stacking the images according to julian date
Next Topic: Re: spawn not working

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

Current Time: Wed Oct 08 19:26:30 PDT 2025

Total time taken to generate the page: 0.00618 seconds