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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Bug? Hash and System Variable [message #84342] Fri, 31 May 2013 05:34
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Fabien writes:

> I can reproduce this on my machine too ({ x86_64 linux unix linux 8.2.2
> Jan 23 2013 64 64})

On my Windows machine, too. It looks like a bug to me.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Bug? Hash and System Variable [message #84345 is a reply to message #84342] Fri, 31 May 2013 03:25 Go 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!
>
Re: Bug? Hash and System Variable [message #84350 is a reply to message #84345] Thu, 30 May 2013 21:10 Go to previous message
SonicKenking is currently offline  SonicKenking
Messages: 51
Registered: October 2010
Member
On Friday, May 31, 2013 2:08:14 PM UTC+10, 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!

BTW, this is the content of !VERSION

** Structure !VERSION, 8 tags, length=104, data length=100:
ARCH STRING 'x86_64'
OS STRING 'linux'
OS_FAMILY STRING 'unix'
OS_NAME STRING 'linux'
RELEASE STRING '8.2.1'
BUILD_DATE STRING 'Aug 20 2012'
MEMORY_BITS INT 64
FILE_OFFSET_BITS
INT 64
  Switch to threaded view of this topic Create a new topic Submit Reply
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 15:37:13 PDT 2025

Total time taken to generate the page: 0.00848 seconds