Fortran Wiki
stderr

!-------------------------------------------------------------------------------
! Example: writing messages to standard error
! Standard: Fortran 2003
!
SUBROUTINE stderr(message)
! "@(#) stderr writes a message to standard error using a standard f2003 method"
   USE ISO_FORTRAN_ENV, ONLY : ERROR_UNIT ! access computing environment
   CHARACTER(LEN=*) :: message
   WRITE(ERROR_UNIT,'(a)')message ! write message to standard error
END SUBROUTINE stderr
!-------------------------------------------------------------------------------

category: code