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

Home » Public Forums » archive » Re: FOR loop ends one above where it's supposed to
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 ends one above where it's supposed to [message #71124 is a reply to message #71120] Wed, 02 June 2010 09:07 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Jun 2, 12:57 pm, Paolo <pgri...@gmail.com> wrote:
> While people here gave a logical explanation as to what is happening,
> I would say that the *safest* practice in your programming is to not
> use the for loop index variable ("i" in this case) for anything else
> in your program. That will make the code much easier to write, read
> and understand.

Which is why I miss block scope in IDL, so that the variable would not
even exist outside the loop.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL for planetary photometry
Next Topic: Re: dealing with arguments

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

Current Time: Wed Oct 08 17:19:23 PDT 2025

Total time taken to generate the page: 0.00395 seconds