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

Home » Public Forums » archive » Re: creating variables in a FOR loop
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: creating variables in a FOR loop [message #79115 is a reply to message #79111] Thu, 02 February 2012 07:17 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Thursday, February 2, 2012 9:53:13 AM UTC-5, singlebinary wrote:

> 5 'im_'+strtrim(temp,2) = mrdfits(files[i],0,h)

This statement does not create a variable but creates a string containing for example "im_1". You can convert a string to a variable with the execute statement

status = execute("im_" + strtrim(temp,2) + "= mrdfits(files[i],0,h)" )

--Wayne
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Coyote Library Update
Next Topic: ANOVA statistical analysis with IDL

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

Current Time: Wed Oct 08 17:32:01 PDT 2025

Total time taken to generate the page: 0.00454 seconds