To stop the execution of any program, press simultaneously
+
.
To have user supply a value for variable X, write INPUT "Real number=";X
Note: instruction INPUT stops the program. The user has to hit
for the program
to continue.
To scan for the key pressed by the user without stopping the program, use INKEY$ function instead of INPUT. This allows the user to control the program by simple menu functions. For example, embed the following lines within DO ... LOOP and stop the program by pressing KeyQ.
Key$=INKEY$
SELECT CASE Key$
CASE "Q"
END 'stop the program
CASE "q"
END 'stop the program
CASE "?"
PRINT "Did you ask for help?"
CASE ELSE
BEEP
END SELECT
A simple way to let the user know that something went wrong is to BEEP.