Syntactically identical to END, STOP also prints a message to the effect that the program has stopped.
You can use STOP at various places in your program to aid debugging. If your program is going wrong, you can place STOP commands at various points to see the path taken by your program. (TRACE is generally a more useful aid to tracing a program's flow unless you are using formatted screen displays).
Once your program has STOPped you can investigate the values of the variables to find out why things happened the way they did.
Stop does not close data files. If you use STOP to exit a program for debugging, CLOSE all the data files before RUNning the program again. If you don't you will get some most peculiar error messages.