38
Let’s try. Type:
10 PRINT 3000000*3000000
RUN
The answer on the display 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.
4. 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:
VARIABLE NAMES
CONTENTS
A
675
B
2.3434
C$
CURTIS
A$
ALPHABET SOUP
You can store a string variable like this:
10 LET A$="ALPHABET SOUP NO 123"
You can have a numeric variable called A and a string variable called A$. The $ lets
BASIC know how to tell them apart.
Содержание PreComputer Prestige
Страница 1: ...COURSE BOOK...