An "endif" won't automatically break out of the "do while" loop, if that's what you're asking. The outer loop will only be broken if the loop's condition is met or if you use an explicit "break" statement.
Also, intead of individual "if...endif" blocks for each test, you should use an "if...elseif...elseif...else" ladder. A "switch" is generally used to test for equivalence, and not for greater-than and less-than comparisons, although it can be kludged in various ways depending on the language.
|