


The END statement must appear as the last statement of every program unit. It
simply consists of the word:
END
which may not be followed by any continuation lines (or comments). The END
statement is executable and may have a label attached. If an END statement is
executed in a subprogram unit, i.e. a procedure, it returns control to the calling
unit; if an END statement is executed in the main program it closes any files
which are open, stops the program, and returns control to the operating
system.


