Write the character sequence hold by the string to a connected formatted unit.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string_type), | intent(in) | :: | string | |||
| integer, | intent(in) | :: | unit | |||
| character(len=*), | intent(in) | :: | iotype | |||
| integer, | intent(in) | :: | v_list(:) | |||
| integer, | intent(out) | :: | iostat | |||
| character(len=*), | intent(inout) | :: | iomsg |
subroutine write_formatted(string, unit, iotype, v_list, iostat, iomsg) type(string_type), intent(in) :: string integer, intent(in) :: unit character(len=*), intent(in) :: iotype integer, intent(in) :: v_list(:) integer, intent(out) :: iostat character(len=*), intent(inout) :: iomsg select case (iotype) case ("LISTDIRECTED") write (unit, '(a)', iostat=iostat, iomsg=iomsg) maybe(string) case ("NAMELIST") error stop "[Fatal] This implementation does not support namelist output" case default ! DT* select case (size(v_list)) case (0) ! DT write (unit, '(a)', iostat=iostat, iomsg=iomsg) maybe(string) case default error stop "[Fatal] This implementation does not support v_list formatters" end select end select end subroutine write_formatted