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

15 2 Commands There are two ways of getting the computer to do something: 1. Give it commands which it can act on immediately. This is what happened when you typed in the lines in chapter 1. 2. Give it a series of numbered instructions , often called statements, which it can store in its memory and carry out in sequence when told to do so. A stored series of instructions is called a program . Many of the keywords in BASIC can be used both as commands and as statements in a program. The rest of this chapter is concerned with ‘command mode’. PRINT is used to make the computer print something on the screen. Try these two examples:

PRINT "HELLO" Don’t forget to press RETURN at the end of each line. PRINT 3 + 4 In the second example you have given the computer a command to print the sum of 3 and 4. The computer can very easily do addition, subtraction, multiplication and division. The addition, subtraction, multiplication and division signs areall on the right side of the keyboard. If you are interested in doing mathematical or financial work then you will need to know the symbols that the computer uses for various mathematical operations. They are: + Addition - Subtraction * Multiplication \ Division ^ Exponentiation .

Decimal point If you want to get the + or * then you will have to press the SHIFT key as well as the key you want. It’s rather like a typewriter: while holding the SHIFT key down, press the + sign once.