W3cubDocs

/GNU Fortran 7

9.101 EXIT — Exit the program with 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.

Standard:

GNU extension

Class:

Subroutine

Syntax:

CALL EXIT([STATUS])

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
See also:

ABORT, KILL

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gfortran/EXIT.html