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

23 Try the following: clear the screen with the command CLS and then LIST the program. It should include the line 20 PRINT "GIVE ME A NUMBER"; If not, then type that line in so that you can edit it. Suppose that you wanted to insert the word BIG so that line 20 reads 20 PRINT "GIVE ME A BIG NUMBER"; then all you have to do is to press the up-arrow cursor key until the small flashing line is positioned under the 2 of 20 . Then press the COPY key to copy the first part of line 20 to a fresh line at the bottom. When the cursor reaches the space after the A where you want to insert the word BIG , just type it in with a space in front – it will appear on the bottom line.

Then COPY the rest of the line 20. The space after the A becomes the space after BIG . At the end press RETURN . Now try changing the program already in the computer once again by doing the following: 1. List the program by using the LIST command. 2. Practice using the cursor control and COPY keys to alter line 20 so that it reads: 20 PRINT "NOW GIVE ME A BIG NUMBER"; 3. Now add these new lines. Don’t forget to press RETURN after each one. 5 CLS 25 REPEAT 35 IF B 37 UNTIL B>=1000 Note: It doesn’t matter in what order you type new lines. The computer will automatically put them into numerical order.

You will see that this is true by typing LIST RETURN These extra lines tell the computer to reject any number smaller than 1000 and to keep on going back to line 30 to ask for a new number until that number is greater than 1000. The symbol means ‘is smaller than’, and > means ‘is greater than’. IF and THEN are self explanatory.