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 #34361 is a reply to message #34357] Mon, 03 March 2003 13:56 Go to previous messageGo to previous message
Steve Nesbitt is currently offline  Steve Nesbitt
Messages: 4
Registered: March 2003
Junior Member
ahhh...thanks! Saves me from dynamically generating the code each time
using a shell script (a major pain).

Paul van Delst wrote:
> 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
>
[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: Sun Oct 12 14:53:31 PDT 2025

Total time taken to generate the page: 0.07914 seconds