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

Home » Public Forums » archive » Re: Bug? Hash and System Variable
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: Bug? Hash and System Variable [message #84345 is a reply to message #84342] Fri, 31 May 2013 03:25 Go to previous messageGo to previous message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
I can reproduce this on my machine too ({ x86_64 linux unix linux 8.2.2
Jan 23 2013 64 64})

Strange...

On 05/31/2013 06:08 AM, SonicKenking wrote:
> The following simple code errors out
>
> defsysv, '!SOME_SYS_VAR', hash()
> help, !SOME_SYS_VAR
> (!SOME_SYS_VAR)['A'] = 1
> end
>
> The output is as follows
> <Expression> HASH <ID=1 NELEMENTS=0>
> % Expression must be an array in this context: !SOME_SYS_VAR.
>
> The funny thing is that I can actually run the same command by typing it on the IDL prompt. So following command runs:
>
> IDL> (!SOME_SYS_VAR)['A'] = 1
> IDL> print, !SOME_SYS_VAR
> A: 1
>
> Is it a bug or feature? And how can I correct the code so it can run inside a routine instead of on the prompt (@ is the same as typing on the prompt).
>
> Thanks!
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Best way to determine if location of irregular data is within polygon? Contour? Better method?
Next Topic: Re: IDL problem with ncdf_vardef: can' exit definition mode

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

Current Time: Wed Oct 08 17:24:20 PDT 2025

Total time taken to generate the page: 0.00478 seconds