To print an error number and an error message or just an error message.
The message is writen to output_unit
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ierr |
The error number (printed only if non-zero). |
||
character(len=*), | intent(in) | :: | mess |
Message to be printed. |
subroutine cfaerr (ierr,mess) integer,intent(in) :: ierr !! The error number (printed only if non-zero). character(len=*), intent(in) :: mess !! Message to be printed. if (ierr /= 0) write (output_unit,'(A,I5)') ' IERR=', ierr write (output_unit,'(A)') trim(mess) end subroutine cfaerr