m_format.f90 Source File

This File Depends On

sourcefile~~m_format.f90~~EfferentGraph sourcefile~m_format.f90 m_format.f90 sourcefile~m_variablekind.f90 m_variableKind.f90 sourcefile~m_variablekind.f90->sourcefile~m_format.f90
Help

Source Code


Source Code

module formatting
  !! Contains routines that handle string formatting
  use variableKind, only: i32
implicit none

contains
!  !====================================================================!
!  function getNFormats(N, formt) result(FMT)
!    !! Create a format string with N times strings for writing on a single line
!  !====================================================================!
!  integer(i32), intent(in) :: N !! Number of times to repeat the format
!  character(len=*), intent(in), optional :: formt !! Optional format to repeat
!  character(len=20), intent(out) :: FMT
!    !! Format statement with (N('a'))
!  if (present(formt)) then
!    write(FMT,'("(",i0,a,")")') N,trim(formt)
!  else
!    write(FMT,'("(",i0,"(a))")') N
!  endif
!  end function
!  !====================================================================!

end module