sourcery_formats_m.F90 Source File


Files dependent on this one

sourcefile~~sourcery_formats_m.f90~~AfferentGraph sourcefile~sourcery_formats_m.f90 sourcery_formats_m.F90 sourcefile~sourcery_formats_s.f90 sourcery_formats_s.F90 sourcefile~sourcery_formats_s.f90->sourcefile~sourcery_formats_m.f90 sourcefile~sourcery_m.f90 sourcery_m.F90 sourcefile~sourcery_m.f90->sourcefile~sourcery_formats_m.f90 sourcefile~sourcery_string_s.f90 sourcery_string_s.f90 sourcefile~sourcery_string_s.f90->sourcefile~sourcery_m.f90

Source Code

module sourcery_formats_m
  !! Useful strings for formatting `print` and `write` statements
  implicit none

  character(len=*), parameter :: csv = "(*(G0,:,','))" !! comma-separated values
  character(len=*), parameter :: cscv = "(*('(',G0,',',G0,')',:,',')))" !! comma-separated complex values


#ifndef _CRAYFTN
  interface

    pure module function separated_values(separator, mold) result(format_string)
      character(len=*), intent(in) :: separator 
      class(*), intent(in) :: mold(..)
      character(len=:), allocatable :: format_string
    end function

  end interface
#else
  interface separated_values

    pure module function separated_values_1D(separator, mold) result(format_string)
      character(len=*), intent(in) :: separator 
      class(*), intent(in) :: mold(:)
      character(len=:), allocatable :: format_string
    end function

  end interface
#endif

end module