HP 3000 Manuals

STOP Statement (Executable) [ HP FORTRAN 77/iX Reference ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Reference

STOP Statement (Executable) 

The STOP statement terminates program execution.

[]
----------------------------------------------------------------------------------------------- | | | | | Item | Description/Default | Restrictions | | | | | ----------------------------------------------------------------------------------------------- | | | | | constant | Integer or character constant to | Cannot be a constant name or | | | be displayed in the STOP message. | constant expression. | | | | | ----------------------------------------------------------------------------------------------- The STOP statement terminates program execution immediately without allowing execution to reach the END statement of the main program unit. If constant is supplied, the message "STOP constant_value" is written to the standard error unit and the program terminates. If constant is omitted, the program terminates without a message. Examples Notes -------------------------------------------------------------------------------------- STOP 7777 The message STOP 7777 is written to standard error. STOP 'Program ended!' The message STOP Program ended! is written to standard error. STOP Nothing is written to standard error. READ *,a,b If a is less than b, execution terminates with the IF (a .LT. b) STOP 56789 message STOP 56789. When b equals a, execution 10 b = b-1 terminates with the message STOP All done. IF (b .EQ. a) STOP 'All done' GOTO 10 END


MPE/iX 5.0 Documentation