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

Home » Public Forums » archive » Re: Having trouble stopping a loop (or loop de loop de 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: Having trouble stopping a loop (or loop de loop de loop) [message #62150 is a reply to message #62146] Tue, 26 August 2008 08:18 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On Aug 26, 8:20 am, Mike <Michael.Mill...@gmail.com> wrote:
> start = starting value
> step = step value
> N = number of steps to take
> for i = 0L, N-1 do begin
>    x = start + i*step
>    ;; do stuff with x...
> endfor

Yep, although I prefer (but I suppose it doesn't matter much since you
are already looping):

start = starting value
step = step value
N = number of steps to take

x = start + findgen(N) * step

for i = 0L, N - 1L do begin
;; do stuff with x[i]
endfor

Mike
--
www.michaelgalloy.com
Tech-X Corporation
Software Developer II
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Matching Lats and Lons from two arrays
Next Topic: Re: heap_free fatal error

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

Current Time: Sat Oct 11 10:17:16 PDT 2025

Total time taken to generate the page: 1.67759 seconds