[Info-vax] Fortran Exit Codes

Lawrence D'Oliveiro ldo at nz.invalid
Sun Feb 25 19:16:04 EST 2024


Just looking at the Fortran 2018 spec, section 11.4, “STOP and ERROR
STOP statements”. Paragraph 2 says:

    When an image is terminated by a STOP or ERROR STOP statement,
    its stop code, if any, is made available in a processor-dependent
    manner. If the stop-code is an integer, it is recommended that the
    value be used as the process exit status, if the processor
    supports that concept. If the stop-code in a STOP statement is of
    type character or does not appear, or if an end-program-stmt is
    executed, it is recommended that the value zero be supplied as the
    process exit status, if the processor supports that concept. If
    the stop-code in an ERROR STOP statement is of type character or
    does not appear, it is recommended that a processor-dependent
    nonzero value be supplied as the process exit status, if the
    processor supports that concept.

But on VMS, the usual success status code is 1, with other odd values
indicating varying degrees of success, while even values (including
zero) indicate warnings or errors. So how does that work?



More information about the Info-vax mailing list