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

79 >RUN **********==================== **********==================== **********==================== **********==================== **********==================== ============================== ============================== ============================== ============================== ============================== ============================== The listing shown above is not very easy to follow – try typing LISTO 2 >LISTO 2 >LIST 10 FOR ROW = 1 TO 5 20 FOR STAR = 1 TO 10 30 PRINT"*"; 40 NEXT STAR 50 FOR STRIPE = 1 TO 20 60 PRINT "="; 70 NEXT STRIPE 80 PRINT 90 NEXT ROW 100 FOR ROW = 1 TO 6 110 FOR STRIPE = 1 TO 30 120 PRINT"="; 130 NEXT STRIPE 140 PRINT 150 NEXT ROW and then re-listing the program.

This causes each of the ‘nested’ FOR...NEXT loops to be indented which can make it easier to follow. Lines 20 to 40 print out ten stars. Lines 50 to 70 print out 20 equal signs. Lines 10 and 90 ensure that the above are repeated five times. Lines 100 to 150 print out six rows of 30 equal signs.