if condition fail

Thank you UKHeliBob for your kind information.Now I can understand what happened inside my program.