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

Home » Public Forums » archive » V6.0 indexing change
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
V6.0 indexing change [message #36196] Tue, 12 August 2003 08:10
Wayne Landsman is currently offline  Wayne Landsman
Messages: 117
Registered: January 1997
Senior Member
I haven't installed V6.0 yet myself but I have been informed by Mike
Corcoran of a change that can break some existing code.

Formerly, if one had a structure, say a = {x:indgen(10)} which was
accessed by a 1 element vector, say i = [3], then the result a.x[i]
would be a scalar. In V6.0, however, the result is now a 1 element
vector.

I have to say that the V6.0 method makes more more sense -- subscripting
with a 1 element vector should return a 1 element vector. But it can
break existing code because logical tests such as

if a.x[i] EQ 3 then stop

will no longer work. The fix is simple enough ( set i = i[0] first )
but users might want to fix the code before upgrading to V6.0.

--Wayne Landsman landsman@mpb.gsfc.nasa.gov
[Message index]
 
Read Message
Previous Topic: Re: about LOADCT on WindowXP
Next Topic: HIST_ND

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

Current Time: Wed Oct 08 11:00:10 PDT 2025

Total time taken to generate the page: 0.00444 seconds