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

Home » Public Forums » archive » creating variables in a FOR loop
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
creating variables in a FOR loop [message #79118] Thu, 02 February 2012 06:53
Rohit Deshpande is currently offline  Rohit Deshpande
Messages: 6
Registered: June 2011
Junior Member
Hello All,

I would like to read in 6 files and associate 6 variables in which to
store the information. In the code below, I like to create variables
which names, "m_0, im_1 and so on. However, I get s 'Syntax error' in
line 6. Please help! Thanks in advance.

1 PRO CCFs
2 files=file_search('*.fits')
3 FOR i = 0, n_elements(files)-1 DO BEGIN
4 temp = i
5 'im_'+strtrim(temp,2) = mrdfits(files[i],0,h)
6 ENDFOR
7
8 END
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Update to AL_Legend
Next Topic: Fill the under of a x-y plot

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

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

Total time taken to generate the page: 0.00598 seconds