Classic Computer Magazine Archive BEST OF ANTIC VOLUME 1


Type Your Program Once

TYPO is designed to help you fmd typing errors made when entering BASIC programs published in ANTIC. When used properly, TYPO will produce a table of values which can be used to pinpoint where an error was made. ANTIC will publish a table with every BASIC listing, and the user may compare the two tables to ensure they are identical. If they are not, then the user presumably made a "typo" which needs to be corrected.

How To Use TYPO

1. Enter program listing Exactly as shown.

2. LIST this program to disk ( LIST "D:TYPO.LIS") or cassette ( via LIST "C:"). When using a cassette, use an entire blank cassette for just this program.

3. Type NEW to clear memory.

4. Type in a program from this book, or ANTIC magazine.

5. LIST this program to the disk ( LIST "D:NAME") or cassette ( LIST "C:). Type NEW and reenter the program ( ENTER "D: NAME" or ENTER "C;").

6. Append the TYPO program onto the end of the program from the disk ( ENTER "D:TYPO.LIS") or cassette ( ENTER "C").

7. Type GOTO 32000 and a checksum table will be printed on your screen. Compare this table with the one published; if they agree you are finished and the program should run.

8. Note the value of the "variable checksum" printed on the screen, and keep it handy.

9. If the table does not agree with the published table, examine the lines which have codes and/or lengths which disagree. Correct any errors.

10. If and only if the variable checksum you noted agrees with that printed with the program, go to step 7 above and try again.

11. If the variable checksums do NOT agree, you MUST go to step 5 above and perform the listing and reentering ritual! You may skip step 6, however, since presumably you have the combined programs now LlSTed together.

Follow these instructions exactly!

What TYPO Is Telling You

THIS PROGRAM IS FUSSY! It cares about every little period, comma, and even spaces. It also cares about the order in which you typed in program lines! The order in which the variable names are stored depends upon the order the lines were typed. Should this order be altered the values of the tokens and the subsequent checksums will be altered.

The "variable checksum" is used to correct for some of this by producing an (almost) unique checksum which depends on the order in which the variables are stored. If your checksum doesn't agree, you have either entered lines in the wrong order or misspelled a variable name. In either case, you must correct your error(s) and then go through the LIST/NEW/ENTER sequence to assure that the variables are put back in order.

The length shown is the number of bytes encountered by TYPO within the line number range shown. The two-letter code is essentially a checksum of "length" bytes within that same range. If the length is correct and the checksum is off, you have made a spelling or punctuation error. Watch out: since all keywords and operators (including two-character operators such as " =") are tokenized as one byte, the length might stay the same even though you type SET COLOR for CLR. Note!! You may use abbreviations for keywords as long as the LISTed result conforms to the published listing.

If the length bytes disagree, you have added or deleted characters. If nothing obvious shows, pay special attention to characters in quoted strings and/or REMark statements. It is easy to omit a space or punctuation in a REMark, thinking that "REMarks don't matter"; but to TYPO they do.

This is a small but sophisticated program,use it and typing errors will be reduced.

NOTE: TYPO asks for output file. Respond with S for television or P for printer.

This TYPO Table is the result of using TYPO to check itself. To do this you must change lines 32180 and 32200 first. In those lines change 32000 to 32500. Then type GOTO 32000 or RUN. Either of these commands will initiate TYPO, ask you to designate your output file (S for screen, P for printer), and then produce a table for itself. This, your first TYPO Table, should match the one above. If it does not, examine your program for typing errors and repeat the process until you get it right.

by Bill Wilkinson

Bill Wilkinson is the president and founder of Optimized Systems Software, Inc., of Cupertino, California. He helped design the original Atari BASIC and has developed several other computer languages including Basic A+ and the new language, Action!. Bill's work has been published in a number of publications including ANTIC. His checksum program, TYPO, is continuously used in ANTIC to help ATARI users verify their BASIC programs after typing them in.

Listing: TYPO.LST Download / View