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
   IMPLICIT NONE
   CHARACTER(LEN=*),INTENT(IN) :: message
   WRITE(ERROR_UNIT,'(a)')trim(message) ! write message to standard error
END SUBROUTINE stderr
!-------------------------------------------------------------------------------

category: code