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

Home » Public Forums » archive » Re: Why does '[1,2,3] EQ [2]' yield zero but '[1,2,3] EQ 2' yield [0,1,0] ?
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: Why does '[1,2,3] EQ [2]' yield zero but '[1,2,3] EQ 2' yield [0,1,0] ? [message #54363 is a reply to message #54361] Fri, 01 June 2007 21:29 Go to previous message
sujian is currently offline  sujian
Messages: 10
Registered: May 2007
Junior Member
On Jun 1, 10:18 pm, Gianguido Cianci <gianguido.cia...@gmail.com>
wrote:
> Hi all,
>
> The post title says it all. I thought "everything" in IDL was an
> array, but using [2] and 2 with relational operators is not
> equivalent...
>
> I searched the doc and newsgroup for quite a while, but obviously I
> did not come up with search terms that are specific enough.
>
> It took me a while to track this down in some code I was writing. My
> bug is now fixed *but* I don't understand why exactly. And we all know
> voodoo and IDL don't mix :-) can somebody clarify please?
>
> Many thanks,
> Gianguido
>
> PS: I have a feeling this issue came up not too long ago, just
> couldn't find it. Sorry :-( Feel free to dispense with this question
> with a link.


my guess:

[1,2,3] EQ [2] compares two sets, one with 3 elements and the other 1.


[1,2,3] EQ 2 compares each element of the first set with number 2.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Why does '[1,2,3] EQ [2]' yield zero but '[1,2,3] EQ 2' yield [0,1,0] ?
Next Topic: Re: make_scalar?

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

Current Time: Tue Dec 02 10:04:53 PST 2025

Total time taken to generate the page: 0.15558 seconds