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

Home » Public Forums » archive » IDL8.4 hard crash
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: IDL8.4 hard crash [message #90302 is a reply to message #90299] Wed, 18 February 2015 13:47 Go to previous messageGo to previous message
JDS is currently offline  JDS
Messages: 94
Registered: March 2009
Member
>
> The crash is fixed in IDL 8.4.1. Thanks for reporting it!
> -Chris

Thanks.

> p.s. I can't quite wrap my head around how the auto-instantiation would work. More examples?

If you are constructing some nested HASH structure, now you must say:

a=hash()
a['key']=hash()
a['key','sub1']=hash()
a['key','sub1','sub2']=hash()
a['key','sub1','sub2','value']=1.0

This might more typically occur inside a loop pulling keys and values from various locations. This is also by the way why I was using a=hash() & c=(a['b']=hash()) -- to make this sort of construction slightly less painful.

Auto-instantiation means that any hash key which references an undefined value *on assignment* will cause that value to be initialized as a HASH object instead of just saying "key does not exist" and aborting. If that were in place, the above would simply be:

a=hash()
a['key','sub1','sub2','value']=1.0

This comes up quite a bit when attempting to populate deeply nested HASH structures. You end up with code sprinkled with lots of useless tests like:

if ~a[key1].hasKey(key2) then a[key1,key2]=hash()

With auto-instantiation, these statements would be implicit. It also would make Perl programmers happy ;).

Thanks again,

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: raw contents of data memory
Next Topic: Ring in function graphics

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

Current Time: Wed Oct 08 11:36:41 PDT 2025

Total time taken to generate the page: 0.00408 seconds