Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file_unit | |||
character(len=*), | intent(in) | :: | header_footer | |||
character(len=*), | intent(inout) | :: | text_line | |||
type(gmsh_msh1_status_type), | intent(inout) | :: | status | |||
logical, | intent(out) | :: | flag |
subroutine read_gmsh_msh1_header_footer(file_unit, header_footer, text_line, status, flag) integer, intent(in) :: file_unit character(len=*), intent(in) :: header_footer character(len=*), intent(inout) :: text_line type(gmsh_msh1_status_type), intent(inout) :: status logical, intent(out) :: flag read( &! unit = file_unit , &! fmt = '(A)' , &! iostat = status%io%code , &! iomsg = status%io%msg(:) &! ) &! text_line(:) select case(status%io%code) case(iostat_success) flag = trim( text_line(:) ) .eq. header_footer(:) if (flag) then status%err%msg(:) = ' ' else status%err%msg(:) = 'The read text line is not `' // header_footer(:) // '`.' end if case(iostat_end) status%err%msg(:) = 'Failed to found the `' // header_footer(:) // '`' case default status%err%msg(:) = 'Failed to read the `' // header_footer(:) // '`' end select end subroutine read_gmsh_msh1_header_footer