VTech Power Pad Precomputer Power Pad Plus User Manual page 41

Vtech precomputer power pad plus user's manual
Table of Contents

Advertisement

The computer creates a box in memory and calls it "A". It puts the number 8 in this box.
Now type:
20
LET B=10
The computer creates a box called "B" and places 10 into it.
Type:
30 LET B=15
Since there is a box called "B" already with a value of 10 in it, it doesn't make another
box called "B" with a value of 15 in it. The number 10 is just replaced with the number
15.
Now type:
40
LET C=A+B
This statement is a bit more complicated. Here's how it works. First, the computer searches
for a memory box called "B" and finds the number 15. The "+" sign tells the computer
to add the numbers found in "A" and "B" together. It computes this and the answer is
23. Now, where is the answer placed? 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 creates one in memory and then puts the answer there.
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 in 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
press ENTER
press ENTER
press ENTER
press ENTER
press ENTER
press ENTER
37

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents