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

Home » Public Forums » archive » Re: dynamically naming variables
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: dynamically naming variables [message #34362 is a reply to message #34361] Mon, 03 March 2003 13:48 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Steve Nesbitt wrote:
>
> Howdy folks,
>
> I was wondering if there was a way to dynamically name a variable in
> IDL, something like:
>
> varnames=['temp1','temp2','temp3']
>
> for i=0, n_elements(varnames)-1 do begin
>
> `varnames[i]`=bytarr(25)
>
> endfor
>
> I would appreciate any help on this, or a way to get around this issue.

Use the EXECUTE command to execute a command you create in a string variable.

paulv

--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
Ph: (301)763-8000 x7748
Fax:(301)763-8545
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: 2 questions about .sav files
Next Topic: Re: current directory

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

Current Time: Sat Oct 11 20:56:57 PDT 2025

Total time taken to generate the page: 0.96104 seconds