The BASIC Character Set
There are three types of characters used in BASIC. These are: (1) alphabetic, (2) numeric, and (3) special characters.
ALPHABETIC CHARACTERS.—The alphabetic characters used in BASIC are the standard English alphabet, A through Z.
NUMERIC CHARACTERS .—The numeric characters used in BASIC are the digits 0 through 9.
SPECIAL CHARACTERS.—The following are special characters used in BASIC:
OTHER SPECIAL CHARACTERS.—Some special characters are com-binedto form other elements in BASIC. The following list shows these com-binations:
> = greater than or equal
< = less than or equal
<> not equal
When you are using numeric data in a BASIC program, there are certainconventions that must be adhered to. You cannot use "$" (dollar sign), ‘‘, " (comma), or the "/" (slash) in a BASIC number. There are also restrictions on the number of digits that can be used in one data element. The number of digits may vary depending upon the computer you are using. Refer to your user’s manual for specific instructions. Table 2-2 shows examples of correctly and incorrectly coded BASIC numbers.
Table 2-2.—BASIC Numbers
SCIENTIFIC NOTATION.—As seen in Table 2-2, in the third example,we have a number, +567890100, with too many digits. You may ask, how do we represent very large and very small numbers? Scientific notation is used. In scientific notation numbers are expressed in terms of a figure between 1 and 10 times a power of 10. The number 567890100 would be written 5.678901 x 108 in scientific notation. This method uses exponent form
5.678901E8 = 5.678901 × 108 = 567890100
Table 2-3 shows other examples of the use of E notation.
Table 2-3.—E Notation
Since we’re multiplying by powers of 10, the integer following the E indicateshow many positions and in what direction to move the decimal point. If the integer after the letter "E" is negative, you move the decimal point to the left; if the integer is positive, you move the decimal point to the right.