The ZX80 Operating Manual

Sinclair ZX Spectrum
You may occasionally get into difficulties.

These can be divided into two sorts:

(a) Problems with the system
(b) Problems with your programs.

Most problems with the system are likely to occur when you're entering string variables into your programs. One favourite is deleting the quotation marks round the string by accident. When the computer is waiting for you to enter a string variable it prints "".

If you enter the wrong string and then use RUBOUT to delete it you may delete one or other of the quotation marks. This will give rise to a syntax error symbol. If you see this check to see that both quotes are there.

If you have written a program which calls for a null string to be entered, and the program is recursive, you may find it very difficult to get out of the program back into command mode. Whatever you enter seems to have no effect! When (or if) this happens delete the quotes using RUBOUT RUBOUT and enter (say) CHR$ (10**6) which causes arithmetic overflow, giving a 6/N error message (when N is the line number of the INPUT statement reading the string).

Generally speaking the BREAK key (SHIFT SPACE) is the first thing to resort to. If the program is caught in an endless loop, or if it is LOADing unsuccessfully, the screen will grey or black for an indefinite period. BREAK will get you back under these conditions.

If BREAK does not work in this situation there is nothing left to do but switch the ZX-80 off for a few seconds and then switch on. You do lose whatever program was in the ZX-80 if you do this.

When it comes to faults in the program it is difficult to offer such specific advice.

Some problems arise if you type an O instead of a 0.

LET J = O would be accepted as a valid program line but would give a 2/N error code (variable not found) when the program was run. This sort of thing can be very difficult to spot. Similarly S and $ do get confused.

When a program stops unexpectedly or does something peculiar it may be difficult to work out exactly what went wrong. It is possible to carry out a post-mortem by using the immediate PRINT statement to find out what the value of variables (especially loop control variables) was at the time the program stopped. If you type

PRINT J (or whatever variable you want)

the ZX-80 will print it even after the program has stopped running.

Sometimes there is not room to print the whole of the line number in an error message, particularly with error numbers 4 and 5. In this case usually only the first digit of the line number is printed. For example, error 4 on line 250 may cause the message 4/2

Another useful technique is to put STOP statements into programs at key points. When the program reaches the STOP statement it will stop (of course) and you will be able to see how it has performed up to that point. You can then get back into command mode, type CONTINUE (key T) NEWLINE and the program will continue from the STOP statement.

Luckily the ZX-80 is quite choosy about the program lines it will accept and this eliminates many of the problems which can happen with other BASIC's.

Sinclair ZX Spectrum

  Previous Page Back Next Page