VTech Precomputer Power Pad Plus User Manual

Page 42

Advertising
background image

38

You will see the following on the screen:

FIRST NUMBER 8

press ENTER

SECOND NUMBER 15

press ENTER

THE SUM IS 23

Let’s take a look at the print statements on lines 50 through 70. The words in quotes
are called a STRING or a LITERAL. Whatever you put between a set of quotation marks
will appear on the screen exactly the way you typed it. Remember that quotation marks
come in pairs!

Next, the semicolon tells the print statement to print what is immediately to the right of
the end of the string. This is the number 8, which is the value in memory box A.

Suppose that you asked the computer to multiply 3 million times 3 million.

Let’s try. Type:

10

PRINT 3000000*3000000

press ENTER

RUN

The answer on the screen is 9E+12. This is the computer’s way of showing extremely
large numbers. A number with the letter E and a number to the right of the decimal point
is called scientific or exponential notation. You find the decimal point and move the number
of places specified after the “E” to the right filling in with zeros. The long way to write
out the above answer is 9,000,000,000,000. The procedure works in reverse for very small
numbers. The number 9E-12 is .000000000009. This is a very small positive number.
The number -9E+12 is a very large negative number while the number -9E-12 is a very
small negative number.

STRING VARIABLES

String variables are similar to the numeric variables that we have been working with so far
except that the variables contain alphabetic characters (numbers, letters and symbols). The
name of the memory variable always contains a $ to distinguish it as a string variable. String
variables are not used in arithmetic but allow you to store things like your pet’s name. Here
are some examples:

Advertising