A computer cannot performa any task by itself. Like a car without gas, a computer has potential, but without a program, it isn't going anywhere. Most of the programs published in this book are writtin in a computer language called BASIC. Atari 8K BASIC is easy to learn.
Computers can be picky. Unlike the English language, which is full of ambiguities, BASIC usually has only one "right way" of stating something. Every letter, character, or number is significatant. A common mistake is substituting a letter such as "O" for the numeral "0", a lowercase "l" for the numeral "1", or an uppercase "B" for the numeral "8". Also, you must enter all punctuation such as colons and commas just as they appear in the book. Spacing can be important. To be safe, type in the listings exactly as they appear.
The exception to this typing rule is when you see the braces, such as "{DOWN}". Anything within a set of braces is a special character or characters that cannot be easily listed on a printer. When you come across such a special statement, refer to Appendix C, "How to Type in Programs."
Some programs contain a section or sections of DATA statements. These lines provide information needed by the program. Some DATA statements contain actual programs (called machine language); others contain graphical codes. These lines are especially sensitive to errors.
If a single number in any one DATA statement is mistyped, your machine could "lock up," or "crash." The keyboard, break key, and RESET keys may all seem "dead," and the screen may bo blank. Don't panic — no damage is done. To regain control, you have to turn off your computer, then turn it back on. This will erase whatever program was in memory, so always SAVE a copy of your program before you RUN it. If your computer crashes, you can LOAD the program and look for your mistake.
Sometimes a mistyped DATA statement will cause an error message when the program is RUN. The error message may refer to the program line that READs the data. This error is still in the DATA statements, though.
You should familiarize yourself with your computer before attempting to type in a program. Learn the statements you use to store and retrieve programs from tape or disk. You'll want to save a copy of your program, so that you won't have to type it in every time you want to use it. Learn to use the machine's editing functions. How do you change a line if you made a mistake? You can always retype the line, but you at least need to know how to back-space. Do you know how to enter inverse video, lowercase, and control characters? It's all explained in your computer's manuals.
- Type in the program a line at a time, in order. Press RETURN at the end of each line. Use backspace or the back arrow to correct mistakes.
- Check the line you've typed against the line in the listing. You can check the entire program again if you get an error when you RUN the program.
- Make sure you've entered statements in braces ad the appropriate control key (see Appendix C).
- Be sure to SAVE the program on tape or disk before RUNning the program.
Return to Table of Contents | Previous Section | Next Section