write_formatted Subroutine

private subroutine write_formatted(string, unit, iotype, v_list, iostat, iomsg)

Write the character sequence hold by the string to a connected formatted unit.

Arguments

Type IntentOptional 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

Calls

proc~~write_formatted~~CallsGraph proc~write_formatted write_formatted proc~maybe maybe proc~write_formatted->proc~maybe

Called by

proc~~write_formatted~~CalledByGraph proc~write_formatted write_formatted interface~write (formatted) write (formatted) interface~write (formatted)->proc~write_formatted

Source Code

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