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

Home » Public Forums » archive » Indexing problems under V6
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Indexing problems under V6 [message #53195] Fri, 30 March 2007 02:41 Go to previous message
Ian Dean is currently offline  Ian Dean
Messages: 26
Registered: January 2000
Junior Member
Hi,
This is almost a repeat of a psoting by Wayne Landsman, 12-Aug-2003.
Because of contracts, we have been stuck on v5.5 for years!!!
However, we are now in a position to upgrade to 6.3. As part of this, a
great deal of our code is now broken because of the change in indexing.
In 5.5,
a={x:indgen(10)}
b=[1, 4, 10]
c=[4]
val=a.x[c] <<<<<<<<<<this was a scalar of 4
pos=where(b eq val) <<<<<<<<<<<<<< returned [1]

In 6.3.
a={x:indgen(10)}
b=[1, 4, 10]
c=[4]
val=a.x[c] <<<<<<<<<<this is now an array of [4]
pos=where(b eq val) <<<<<<<<<<<<<< now returns -1

The where fails because it is now comparing an array with an array, not an
array with a scalar.
Is there any trick/switch that can be used to revert the action to that used
in 5.5?

The real problem is much deeper than this, as the search may be done several
levels lower than where the selection criteria is setup and furthermore,
some searches genuinely use arrays.

I hope this makes sense and I hope for some favourable replies.

Regards,
Ian
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Calculating Pi
Next Topic: Problem with TIF image

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

Current Time: Fri Oct 10 13:15:39 PDT 2025

Total time taken to generate the page: 1.28220 seconds