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

Home » Public Forums » archive » Re: for loop isn't working
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: for loop isn't working [message #71744 is a reply to message #71743] Thu, 15 July 2010 13:06 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Snow53 wrote:
> Hi, you all are so wonderful to help me with my silly questions. Many
> thanks!
>
> I have this program that converts files to EASE grid within a folder
> and outputs them as a different file. It works fine, but the problem I
> have is that it doesn't loop through all the files in the folder. It
> stops after the first. I can change the file output by changing i
> (example: changing to i=2 gives me output for the second file in the
> list resulting from the search function), but still I only get one
> file output.
>
> It must be something obvious, but I'm not seeing it.
>
> Thanks again. :)
>

> ; loops through and extracts pixel data based on the above-determined
> pixel location.
> for i=1, num_file-1 do begin

you have a nested loop with the same index, and

> for i=0l, 209087-1 do begin
>
> grid[globland_cols[i]-1,globland_rows[i]-1] = vector[i]
> endfor

you return before the end of the outer loop.

> return
>
>
> endfor
>
> end

cheers,

paulv
[Message index]
 
Read Message
Read Message
Previous Topic: for loop isn't working
Next Topic: GDL 0.9rc4+CVS packages for Ubuntu 9.10 and 10.04

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

Current Time: Thu Oct 09 14:54:55 PDT 2025

Total time taken to generate the page: 0.72139 seconds