f18estop.f90 Source File

This file depends on

sourcefile~~f18estop.f90~~EfferentGraph sourcefile~f18estop.f90 f18estop.f90 sourcefile~stdlib_error.f90 stdlib_error.f90 sourcefile~f18estop.f90->sourcefile~stdlib_error.f90 sourcefile~stdlib_optval.fypp stdlib_optval.fypp sourcefile~stdlib_error.f90->sourcefile~stdlib_optval.fypp sourcefile~stdlib_kinds.fypp stdlib_kinds.fypp sourcefile~stdlib_optval.fypp->sourcefile~stdlib_kinds.fypp


Source Code

Source Code

submodule (stdlib_error) estop

implicit none


module procedure error_stop
! Aborts the program with nonzero exit code
! The "stop <character>" statement generally has return code 0.
! To allow non-zero return code termination with character message,
! error_stop() uses the statement "error stop", which by default
! has exit code 1 and prints the message to stderr.
! An optional integer return code "code" may be specified.
! Example
! -------
! call error_stop("Invalid argument")

if(present(code)) then
  write(stderr,*) msg
  error stop code
  error stop msg
end procedure

end submodule estop