76 Look at line 80. This will stop the REPEAT...UNTIL loop if Z=0. However Z is calculated in line 20 and will have a value between 65 and 90. It will never equal zero, so the program will never stop on its own – you have to press the ESCAPE key. Line 80 says 80 UNTIL Z=0 Z=0 will never be ‘true’. Z=0 will always be ‘false’, so line 80 can be replaced with 80 UNTIL FALSE which just means ‘go on for ever’. This is a far better way of doing things than using Z=0 because you might decide to change Z next time you looked at the program.
It is also better to use REPEAT...UNTIL loops in this way than to put at line 80 80 GOTO 20 Using REPEAT...UNTIL keeps this section of the program well organised. See chapter 19 for a comment on GOTO . If you delete line 10, then the computer will meet an UNTIL statement at line 80 with no idea of where the loop is meant to start. >RUN PRESS THE KEY MARKED A THAT TOOK YOU 2.09 SECONDS No REPEAT at line 80 In summary REPEAT...UNTIL should be used for loops which must terminate on some specific condition.