7.10 STOP Statement

The STOP statement terminates program execution before the end of the program unit. It takes the following form:

STOP [stop-code]

stop-code
Is an optional message. It can be either of the following:

Effect on OpenVMS Systems

If you specify stop-code, the STOP statement displays the specified message at your terminal, terminates program execution, and returns control to the operating system.

If you do not specify stop-code, no message is displayed.

Effect on Tru64 UNIX and Linux Systems

If you specify stop-code, the STOP statement writes the specified message to the standard error device and terminates program execution. The program returns a status of zero to the operating system.

If you do not specify stop-code, no message is output.

Effect on WNT and W9* Systems

If you specify stop-code, the effect differs depending on its form, as follows:

If you do not specify stop-code, the STOP statement writes the following default message to the standard error device and terminates program execution:

Stop - Program terminated.

The program returns a status of zero to the operating system.

Examples

The following examples show valid STOP statements:

STOP 98
STOP 'END OF RUN'

DO
  READ *, X, Y
  IF (X> Y) STOP 5555
END DO


Previous Page Next Page Table of Contents