Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

83 HELLO 2 2 HELLO 3 1 HELLO 3 2 HELLO 4 1 HELLO 4 2 If the NEXT X in line 30 is deleted the computer does its best to make sense of the program. 5 FOR H=1 TO 4 10 FOR X=1 TO 2 20 PRINT "HELLO", H,X 40 NEXT H 50 END >RUN HELLO 1 1 HELLO 2 1 HELLO 3 1 HELLO 4 1 This is not the way to write programs! Mis-nested FOR...NEXT loops will cause problems. 5. In summary FOR...NEXT loops should be used when you wish to go through a loop a fixed number of times.