Typo

by William Wilkinson

 

Issue 5

Sep/Oct 83

Next Article >>

<< Prev Article

 

One of the biggest problems in typing in magazine listings is to make sure that you have typed in the program correctly. Many readers have asked if there is a solution to this problem but there is no magic answer, a lot of care and hard work are involved even if you use a utility such as TYPO.

TYPO is used by ANTIC magazine and was first published by them in August 1982. It is reprinted here with their permission. In future we will include a TYPO chart with all but the shortest listings in PAGE 6 which will hopefully help you to correct those bugs.

TYPO will produce a chart which you then compare with the chart printed in the magazine. BE WARNED though, TYPO is very fussy and you must type in the listing exactly as shown-every REM, space and comma, lower case etc. must be the same. TYPO will help you get an identical listing but you still have to search out and correct mistakes. At least the line numbers will be narrowed down.

Here's how to type in the listing. First type in the program exactly as shown (including the REM) and LIST it to disk (LIST"D:TYPO") or cassette (LIST"C:"). Next type NEW and then ENTER the program again (ENTER"D:TYPO") or (ENTER"C:"). Now change the number 32000 in lines 32180 and 32200 to 32500 and RUN the program. Compare the chart with the printed chart. If they are different, check through the listing, make any corrections and go through the procedure again. When the charts agree, change the numbers 32500 back to 32000 in the above lines and LIST the program to a new disk or tape. This is your master TYPO program.

TYPO IN USE

Follow this procedure exactly:

1. Type in a listing from the magazine.

2. LIST the program to disk (LIST"D: NAME" or cassette (LIST"C:").

3. Type NEW.

4. ENTER the program (ENTER"D: NAME" or (ENTER"C:')

5. Change to the disk or cassette with TYPO on and enter TYPO (ENTER"D:TYPO") or (ENTER"C:").

6. Type GOTO 32000. Type S for output to the screen or P for printer. The program will produce a chart. If the chart agrees with the one in the magazine, you have an identical listing. Well done!

7. The chart doesn't agree, does it! Examine the lines which do not agree and correct any errors.

8. IF THE VARIABLE CHECKSUM AGREES go to step 6.

9. If the variable checksum does not agree, you MUST go to step 2 but you can skip step 5 as TYPO will already be on the end of your program.

HINTS ON FINDING ERRORS

If the variable checksum does not agree, you have either typed in lines in wrong order or mispelled a variable name. See the next paragraph to narrow down the area of error, and make the corrections. You must now go through the LIST/NEW/ENTER procedure again to put the variable name table in correct order.

The Length shown is the number of bytes within the program lines shown. The two letter code is essentially a checksum of "length" bytes within that range. If the length is correct and the code is wrong, you have made a spelling or punctuation error. Be careful though, as all keywords and operators are stored as one byte and the length might stay the same even though you type COLOR instead of SETCOLOR. If the length disagrees, you have added or deleted characters or spaces. If nothing obvious shows, pay special attention to REM statements, every space must be there.

TYPO will get you an identical listing (eventually) but don't think it will do it automatically. You still have to search for errors and correct them but at least you will have an idea where they are. 

TYPO is Copyright 1982 ANTIC magazine. Reproduced with permission.

AtariLister - requires Java

top