Thread: Help w/ python.
View Single Post
Old 2005-10-29, 07:34   #4
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

22×3×641 Posts
Default

When you get a neverending loop, look at each program loop and ask yourself:

(1) What, exactly, has to happen in order for this loop to end?

If that question has no answer, there's your problem. But if you can answer question (1), then ask:

(2) Which program statement or statements can, at some time, cause the event that answers question (1)?

If there's no answer to question (2), there's your problem. But if you can answer question (2), then ask:

(3) Are you sure that the statement or statements that answer (2) can ever be executed once the loop starts?

Last fiddled with by cheesehead on 2005-10-29 at 07:48
cheesehead is offline   Reply With Quote