10.7.4 END Statement
The END statement marks the end of a main program.
When BASIC executes an END statement, it closes all files
and halts program execution.
The END statement is optional in BASIC programs.
However, it is good programming practice to include it.
The END statement must be the last statement in the main
program.
If you run your program in the BASIC environment, the
END statement returns you to BASIC command level. If you
execute the program outside the BASIC environment, the
END statement returns you to DCL command level.