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 #54359] Sat, 02 June 2007 14:13 Go to previous message
cgguido is currently offline  cgguido
Messages: 195
Registered: August 2005
Senior Member
On Jun 2, 12:29 am, suj...@gmail.com wrote:
> 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.

I think Wayne (below) is correct, actually, since if you compare
[1,2,3] with 1 or [1] you get:

IDL> print, [1,2,3] eq 1
1 0 0
IDL> print, [1,2,3] eq [1]
1

It seems that [1,2,3] is truncated to one element.


Thanks to both of you for your help,
Gianguido
[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: Fri Oct 10 13:32:53 PDT 2025

Total time taken to generate the page: 0.16020 seconds