17. PROGRAM DECISIONS IF ... ENDIF If the value of a certain variable must fall in the range min%-max%, you could program that as follows using IF ... ENDIF: IF n%>max% n%=max% ELSE IF n% EXIT IF TRUE ! exit the loop ENDSELECT LOOP SELECT-bug In a compiled program, the code between SELECT and ENDSELECT must not exceed 32K or the program will jump to the wrong CASEs. Actually it's more likely that you will be struck by lightning than that you'll ever encounter this bug. Programmers using more than 32K between SELECT and ENDSELECT obviously must have been struck by lightning (or something else) already. If the discoverer of this bug is reading this, I apologize sincerely. Let's hope he or she will not be struck by lightning again. Try the following listing: REPEAT INPUT t$ SELECT t$ CASE "" PRINT "empty string" DEFAULT PRINT "a string" UNTIL t$="q" If you press immediately, you enter the null-string. This is properly recognized in an interpreted program, but a compiled program runs amok. The null-string is not recognized and strange things happen afterwards, including showing a couple of bombs after you pressed "q".