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

Home » Public Forums » archive » Re: comparing numbers using WHERE doesn't work
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: comparing numbers using WHERE doesn't work [message #25241] Sat, 02 June 2001 15:19 Go to previous message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
On Sat, 2 Jun 2001, Miklos Z. Kiss wrote:

> Hi folks:
> I have noticed a strange occurence when I try to compare a number with
> all the elements of an array. I'll show my situation in an example.
> Consider the following array:
> [snip]
> index0 = WHERE(a EQ x)
> index0 = index[0] ; convert from 1-D array to single integer.
> index1 = WHERE(a EQ y)
> index1 = index[0]

I'm not sure why this is happening to you. It works correctly on my
machine. But you can simplify your WHERE query and subsequent
array-to-integer like this:

index0 = ( WHERE(a EQ x) )[0]

-k.


--
Ken Mankoff
LASP://303.492.3264
http://lasp.colorado.edu/~mankoff/
[Message index]
 
Read Message
Read Message
Previous Topic: Removing stray clusters of points
Next Topic: Cannot read top level base window

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

Current Time: Wed Oct 08 14:52:11 PDT 2025

Total time taken to generate the page: 0.00434 seconds