To err is human, and the machine will print out `mishap' messages. Some of these report compile time errors. E.g. if you leave out the "+" between two numbers:
6 6 => ;;; MISHAP - MSEP: MISSING SEPARATOR (eg semicolon) ;;; INVOLVING: 6 6 ;;; DOING : compile ...The `code' before the colon in the top line (`MSEP' in this case), is a key to a help file which will explain in more detail what this sort of error message is about. You can examine the relevant explanatory file with the this command in VED, or direct to Pop-11:
help msepThis will invoke the Pop-11 HELP facility which uses the screen editor VED and will print out an explanation of the missing separator type of error. It should only be used after you have learnt to use the screen editor.
Some mistakes are `syntactic', or `compile time' errors: you have not typed what Pop-11 regards as meaningful instructions. The `MISSING SEPARATOR' error is an example. `Semantic errors', or `run time' errors occur when Pop-11 understand the instructions, but discovers in the course of obeying them that something is wrong, e.g.
"one" + "two" => ;;; Pop-11 doesn't understand English! ;;; MISHAP - NUMBER(S) NEEDED ;;; INVOLVING: one two ;;; DOING : + compilePop-11 understood that it was being told to put two objects on the stack then add them and print out the result. There was no syntactic error. But when it tried to obey the instruction, then at run time it asked the procedure "+" to add the two items on the stack. This procedure (+) checked what it was given as inputs, and then invoked the error handler to print the message above message. Notice that the DOING line mentions that it was actually doing "+", as well as doing "compile". In the previous case it was only doing compile, so the error occurred at compile time.
In order to do anything Pop-11 has to `compile' what you type in, i.e. translate your commands into machine instructions, which are then obeyed. So Pop-11 invoked compile, which invoked the "+" procedure to do something. Thus it was in the middle of doing both the procedure "+" and the (temporarily suspended) procedure "compile", when the error occurred. So:
Pop-11 runs compile compile calls + + calls the error procedure 'prmishap'After the error it goes back to doing whatever it was doing before you typed the command which caused the trouble.
(Note for experienced programmers: there is an `error-break' facility which enables the user to take control when an error or other interrupt occurs. This is done by re-defining either a procedure called PRMISHAP or a procedure called INTERRUPT, or both. The procedure POPREADY can be used for the latter.)