For Retro Computing Enthusiasts
,

A Beginner’s Guide To Typing In Programs

Originally published in COMPUTE!’s Gazette Issue 2, August 1983

What Is Program?

A computer cannot perform any task by itself. Like car without gas, computer has potential, but without program, it isn’t going anywhere.
Most of the programs published in COMPUTE!’s Gazette for Commodore are written in computer language called BASIC. BASIC is easy to learn
and is built into all VIC-20s and Commodore 64s.

BASIC Programs

Each month, COMPUTE!’s Gazette for Commodore publishes programs for both the VIC and 64. To start out, type in only programs written tor your machine, e.g., “VIC Version” if you have VIC-20. Later, when you gain experience with your computer’s BASIC, you can try typing in and converting certain programs from another computer to yours. Computers can be picky. Unlike the English language, which is full of ambiguities, BASIC usually has only one “right way” of staring something. Every letter, character, or number is significant. common mistake is substituting letter such as “O” for the numeral “0”, lowercase “1” 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 magazine. Spacing can be important. To be safe, type in the listings exactly as they appear.

Brackets And Special Characters

The exception to this typing rule is when you see the curved bracket, such as “{DOWN}”. Any thing within set of brackets is special character
or characters that cannot easily be listed on printer. When you come across such special statement, refer to “How To Type In COMPUTE!’s
Gazette Programs.”

About DATA Statements

Some programs contain 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 graphics codes. These lines are especially sensitive to errors.
If single number in any one DATA statement is mistyped, your machine could “lock up,” or “crash.” The keyboard and STOP key may seem
“dead,” and the screen may go 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 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. The error is still in the DATA statements, though.

Get To Know Your Machine

You should familiarize yourself with your computer before attempting to type in program. Learn the statements you use to store and retrieve
programs from tape or disk. You’ll want to save copy of your program, so that you won’t have to type it in every time you want to use it. Learn to
use your machine’s editing functions. How do you change line if you made mistake? You can always retype the line, but you at least need to
know how to backspace. Do you know how to enter inverse video, lowercase, and control characters? It’s all explained in your computer’s
manuals.

Quick Review

1) Type in the program a line at time, in order. Press RETURN at the end of each line. Use backspace or the back arrow to correct mistakes.
2) Check the line you’ve typed against the line in the magazine. You can check the entire program again if you get an error when you RUN the
program.
3) Make sure you’ve entered statements in brackets as the appropriate control key (see “How To Type COMPUTE!’s Gazette Programs” elsewhere
in the magazine.)

We regret that we are not able to respond to individual inquiries about programs, products, or services appearing in COMPUTE!’s Gazette for Commodore due to increasing publication activity. On those in frequent occasions when published program contains typo, the correction will appear in the magazine, usually within eight weeks. If you have specific questions about items or programs which you’ve seen in COMPUTE!’s Gazette for Commodore, please send them to Gazette Feedback, P.O. Box 5406, Greensboro, NC 27403.

Companion disk Companion Disk (.d64)

Enjoyed this? It’s what we do every month.

The revived COMPUTE!’s Gazette brings the spirit of the golden era to today’s retro scene — Commodore, Atari, Amiga, and more, in full-color print and digital every month.