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 #79111 is a reply to message #79107] Thu, 02 February 2012 08:13 Go to previous messageGo to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
On 2 fév, 16:17, wlandsman <wlands...@gmail.com> wrote:
> 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

I rather guess that the compiler simply complains because your left
hand side does not contain a named variable. You cannot store in it,
whatever 'mrdfits' is doing.
Alx.
[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 19:59:06 PDT 2025

Total time taken to generate the page: 0.00424 seconds