STOP(7f),ALLSTOP(7f) - [FORTRAN:STATEMENT] initiates termination of execution (LICENSE:PD)
STOP [ stop-code ] ALL STOP [ stop-code ]The scalar-char-initialization-expr shall be of default kind.
stop-code is scalar-char-initialization-expr
or scalar-int-initialization-expr The scalar-int-initialization-expr shall be of default kind.
Execution of a STOP statement initiates normal termination of execution. Execution of an ALL STOP statement initiates error termination of execution.
When an image is terminated by a STOP or ALL STOP statement, its stop code, if any, is made available in a processor-dependent manner. If any exception is signaling on that image, the processor shall issue a warning indicating which exceptions are signaling; this warning shall be on the unit identified by the named constant ERROR_UNIT. It is recommended that the stop code is made available by formatted output to the same unit.
When normal termination occurs on more than one image, it is expected that a processor-dependent summary of any stop codes and signaling exceptions will be made available.
If the stop-code is an integer, it is recommended that the value also be used as the process exit status, if the processor supports that concept. If the integer stop-code is used as the process exit status, the processor might be able to interpret only values within a limited range, or only a limited portion of the integer value (for example, only the least-significant 8 bits).
If the stop-code is of type character or does not appear, or if an END PROGRAM statement is executed, it is recommended that the value zero be supplied as the process exit status, if the processor supports that concept.
stop (7) | March 11, 2021 |