My programming 'labour of love' at the moment has a main window that never closes (%lw) and which contains a large %gr graphics region. Other windows may be called into existence to do various things, all of which have an effect on the %gr. I found recently that a bloody-minded user could close the main window by using the close 'X' on the top-right of the caption bar. This left any active subsidiary window sulking sullenly in Windows, not showing its %mi icon. I only discovered this by chance because a recompile and relink couldn't generate the .EXE file. The answer to the sulky windows was to examine the return code to SELECT_GRAPHICS_OBJECT@ which I call (before writing to the %gr) to see if the %gr is still there, and if it isn't, to arrange some return mechanism to ensure that the sulky window went away. Before I discovered this, however, I was experimenting with %cc in the main window. The standard callback 'EXIT' wasn't what I wanted, as there was no second chance - there was with 'CONFIRM_EXIT'. Of course, you don't want two 'CONFIRM_EXIT's in any program, as they generate a sense of deja vu (double confirmations required), but an 'EXIT' elsewhere gracefully invokes the 'CONFIRM_EXIT' associated with %cc, which is neat. However, both the standard callbacks leave those sulky windows lurking. To my surprise, when I wrote my own callback function, a Fortran STOP also leaves the sulky windows. I was always of the opinion that STOP was a 'kill-all' command. I recall on an IBM 1130 it would physically stop the machine, so we had to CALL EXIT instead. I noticed in the topic by Sparge that he uses EXIT as a Fortran command, and on searching in the Help file, found EXIT@ and ABORT@ as well. What is the preferred method of making sure that one's program is well and truly dead when you decide to kill it? This information could usefully be collected into one place in the Help file.
Eddie