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

Home » Public Forums » archive » Re: Name of arrays
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: Name of arrays [message #79265 is a reply to message #79264] Sun, 19 February 2012 07:06 Go to previous messageGo to previous message
Israel Rodriguez Herm is currently offline  Israel Rodriguez Herm
Messages: 13
Registered: February 2012
Junior Member
On Feb 19, 4:03 pm, David Fanning <n...@idlcoyote.com> wrote:
> Lajos Foldy writes:
>
>> On Feb 19, 1:30 pm, Israel Rodriguez Hermelo <israelherm...@gmail.com>
>> wrote:
>>> Hi there!
>
>>> I'd like to use a string as part of the name of an array:
>
>>> MONTH = [ 'FEBRUARY' , 'JULY' ]
>
>>> TEMPERATURE+MONTH(0)=fltarr(28)
>
>>> TEMPERATURE+MONTH(1)=fltarr(31)
>
>>> I found any way to do this simple task. Anybody can help me?
>
>>> Thanks in advance!
>
>> (scope_varfetch('TEMPERATURE'+MONTH(0), /enter))=fltarr(28)
>
> Be careful. That's a slippery slope and rarely a
> good idea. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Why did you say that's a slippery slope? Is there a better solution?
I'm already using it with no problems.

Regards,

Israel
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: tracking clusters through multiple timesteps
Next Topic: Issue with console of workbench 8.0

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

Current Time: Wed Oct 08 18:12:11 PDT 2025

Total time taken to generate the page: 0.00234 seconds