Download Print this page

VTech PreComputer 2000 Manual page 24

Advertisement

Now type:
I
20 LET 8=10
press
ENTER
The computer makes a box called "B" and places 1 O i'nto it.
Type:
I
30 LET 8=15
press
ENTER
The computer tries to make a box called
"B",
but it already has one called "B"
which has a value of 1 O in it. No matter, it puts the number 15 into it. The number
10 has been replaced by the number
15.
Now type:
I
40 LET
C=A+B
press
ENTER
This statement is a bit more complicated. Here's how it works. First, the computer
searches for a memory box called "B" and finds in it the number 15. The "+"
sign tells the computer to add the numbers found in "A" and "B"
together.
It
does that and the answer is 23. Now, where to put the answer? No problem
.
The "=" tells the computer to store the answer in a memory box called "C". The
computer searches for a box called "C". It doesn't find one so it makes one in
memory and then puts the answer into it.
Of course, if there was a memory variable called "C" that had a number in it
from a previous operation, the old number would be replaced by the new one
by this statement.
Now let's finish this by -typing:
50 PRINT "FIRST
NUMBER";
A
60 PRINT "SECOND NUMBER"; B
70 PRINT "THE SUM IS"; C
RUN
You will see the following on the display:
FIRST NUMBER 8
SECOND NUMBER 15
THE SUM IS 23
23

Advertisement

loading
Need help?

Need help?

Do you have a question about the PreComputer 2000 and is the answer not in the manual?