|★ APPLICATIONS ★ DIVERS ★ TYPE-WRITER|AMSTRAD ACTION) ★|
|Type-Writer (Amstrad Action)||Applications Divers|
Newcomers to Type-Ins complain that, because they don't understand what the lines do, they don't know how to debug (correct) their programs. What's needed is a means to ensure that absolutely anybody can put in a listing and be sure it's right. Hence AA Type-Righter.
Start typing in the program now (don't bother running it until you've read the page). Once it has worked, two interception routines are set up to intercept printing to the screen and printer. Every time the computer notices a carriage return, it adds up all the characters it has printed since the CR, and produces a checksum figure. This always starts with a capital then lower case, and this is repeated.
So every time you type in a line for a Type-In (don't forget to enter new to get rid of Type-Writer!) you can compare the checksum figure with what's printed in the magazine. If they're the same, then all is well. If they're different. then what you've typed is not what the program wants.
Each month all programs in Type-Ins will have a list of these four digit numbers beside them. However, to help stop you typing them in accidentally as part of a program, we'll print them - in a column - before the program lines.
When you're typing in listings though, remember that the checksum figure is printed last. We've printed a list of the figures with Type-Writer-not because they'll be much use, but just as an indication of what to expect.
When first run, the program asks if the machine you are using is a 464. If it isn't, or you have a 6128 ROM fitted, then do not answer yes! (Forum will now prompty fill up with dozens of letters on how to get the machine to do this for itself. Never mind)
If you get a Data Error message, then carefully check lines 200-310. Not getting such an error does not necessarily mean that the data is correct - if two values were transposed for example, the computer would not notice.
When, after typing in the whole listing (yes, I know it's a bore, but I can't come round to your house and do it for you, 'cos I've lost your address), you finally get checksums appearing after everything you type, type list to compare the values in the magazine with those on the screen (list #8 for a printer copy works fine too).
When you get a checksum that's different from the one printed in the magazine, here's what you do: DON'T PANIC!
Type-Writer is very sensitive, and even takes note of swapped characters and embedded spaces...
The spacing in Type-Ins has been designed to make the listing as easy as possible. So the text never joins back onto the line number: it is done as a separate block. Also, when a line is too big to run continuously along the page, it breaks at either a space or a punctuation mark: colon, semicolon, comma, bracket or full stop.
One thing to bear in mind when puzzling how long a line actually is: all the characters are exactly the same width in the listings. You can actually count up the number of spaces or whatever used in a string, simply by counting them on a line either below or above the one you want.