Escape

Escape

Escape is a key pressed to break program execution or cancel text input (for example, when entering program lines with AUTO. It triggers error 17, Escape.

On the TI-83+ or TI-84+ series calculators, the On button is used as the Escape key.

Break

There are some instances where BBC BASIC can appear to go into an infinite loop and this is the only way to remedy it. Take, for example, the following code:

10 ON ERROR PRINT "Whoops"
20 X=1/0

Line 20 triggers an error, so BBC BASIC executes the error handler in line 10. Once it has printed Whoops it carries on to line 20, triggers the error again, then jumps back to 10. You cannot break out of this loop as pressing Escape itself triggers an error!

Holding down the Escape key for roughly five seconds forces BBC BASIC to restart. As it will have started with a NEW program you will need to use the OLD keyword to retrieve the program you were working on.