Possibly better loop construct, also labels+goto important and on the fly compiler idea.

Skybuck Flying Windows7IsOK at DreamPC2006.com
Tue Oct 29 07:37:36 EDT 2013


> Because it's logical.

"
What is logical?
"

To put the exit condition at the bottom is logical.

The exit condition glues the loop to the code that will be executed next 
which is also at the bottom.

Example:

Loop

NextCode

^


Placing the exit ondition near next code makes more sense at least in 
situation where I was programming.

I will give you an example:



LoopBegin( Step = 10 )

    if ButtonExists then
    begin
        ClickButton()
    end;

LoopEnd( ButtonClicked )

Execute next code...

This loop waits for the button to appear, once it's found it is clicked and 
then the loop exits to continue the next code.

Putting this exit condition on the top makes no sense.

Bye,
  Skybuck. 




More information about the Python-list mailing list