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

Home » Public Forums » archive » buggy dictionary
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
buggy dictionary [message #91129] Mon, 08 June 2015 07:08 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
Hi,
I've just encountered another bug using dictionaries.

This is ok:
IDL> a = dictionary('b',findgen(10))
IDL> print, a['b',1:-1]
1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000

Doing the same, but inside an object (that being self.a['b',1:-1]) will make the IDLDE crash "hard" (=window closes without warning).
Here is an example:

pro testObjBug::testIt
print, self.aa['b',1:-1] ;this makes IDL crash
end

function testObjBug::init
self.aa = dictionary('b',findgen(10))
return, 1
end

pro testObjBug__define
class = {testObjBug,$
aa:obj_new()}
end

pro testObjBug
o = obj_new('testObjBug')
o->testIt
end

The only way around this is to copy the variable out of the object:
aa = self.aa['b']
print, aa[2:-2]

Cheers,
Helder

PS: I've submitted this to IDL. It's logged with incident nr 294397.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Multiple Processing
Next Topic: sort points clockwise or clounterclockwise

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

Current Time: Wed Oct 08 15:47:52 PDT 2025

Total time taken to generate the page: 0.00382 seconds