in reply to To end infinite while loop

Read the code, interpret the code, ... add print statements.

if all else fails, post code here :)