END

PURPOSE:
To terminate a PROGRAM and specify the physical end of the program. It performs the following duties:
        Resets ERR, to 0
        Resets CTL to 0
        RESETS FOR/NEXT and GOSUB/RETURN stacks
        Resets PRECISION to 2
        Resets the PROGRAM EXECUTION to statement 1.
        Resets the SETTRACE option.
        CLOSEs all FILES ,except 0
        Returns to CONSOLE MODE.
STATEMENT SYNTAX:
{stno} END
EXAMPLE:
999999 END
NOTES:
The END statement should be used as the last physical line of the program. The END and STOP statements are identical in execution. However during a MERGE statement if an END statement is MERGEd the MERGE terminates. Therefore the STOP statement should be used everywhere except the last physical line of the program.

Execution of the END statement does not alter the contents of the DATA AREA or the PROGRAM AREA.