Multiplication involves using the * symbol, and division, the / ;
PRINT 12*9
PRINT 25/2
Basic contains many other arithmetic functions which can be used to find
things like the square root of a number, or calculate its logarithm. Try typing:
PRINT SQR(9)
PRINT LOG (75)
If you intend to use your computer mainly for carrying out many complex
calculations, you may find your needs are better met by ViewSheet, which is
available from Acorn software dealers.
The screen is looking rather cluttered now, so type:
CLS
which is the BASIC instruction to clear the screen.
You have been giving commands which the computer obeys immediately. More
commonly, you will give the computer a series of numbered instructions to
obey. These instructions are stored in the memory and are called the program.
The computer only obeys program instructions when you want it to do so.
You can see the difference between the methods of giving instructions by
typing:
10 PRINT "Hello''
This time nothing happens and the > prompt reappears.
At the start of the line you typed the number 10. This is called a line number,
and it tells the computer that the statement which follows is not to be obeyed
immediately. Instead the line is stored in the memory, as you can see by typing:
LIST
Your one-line program is listed on the screen. You can make the computer
carry out or 'execute' this very short program by typing:
RUN
Once the computer finishes executing the program, the > prompt returns to
the screen. This shows that the computer is ready to accept further commands
at the keyboard. The program is still stored in memory, as you can confirm by
typing:
LIST
C 2