EXIT (The GNU Fortran Compiler)

### 8.108 `EXIT` — Exit the program with status. ¶

Synopsis:

  `CALL EXIT([STATUS])`

Description:

  `EXIT` causes immediate termination of the program with status. If status is omitted it returns the canonical success for the system. All Fortran I/O units are closed.

Class:

  Subroutine

Arguments:

  STATUS | Shall be an `INTEGER` of the default kind.

Return value:

  `STATUS` is passed to the parent process on exit.

Example:

      program test_exit
        integer :: STATUS = 0
        print *, 'This program is going to exit.'
        call EXIT(STATUS)
      end program test_exit

Standard:

  GNU extension

See also:

  `ABORT` — Abort the program,
  `KILL` — Send a signal to a process