EXIT Subroutine

Intrinsic Subroutine: Terminates program execution, closes all files, and returns control to the operating system.

Syntax

CALL EXIT ( [status] )

status
(Optional; output) Is an integer argument you can use to specify the image exit-status value.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: END, ABORT

Example

    INTEGER(4) exvalue
! all is well, exit with 1
    exvalue = 1
    CALL EXIT(exvalue)
! all is not well, exit with diagnostic -4
    exvalue = -4
    CALL EXIT(exvalue)
! give no diagnostic, just exit
    CALL EXIT ( )