use existing functionality
This commit is contained in:
parent
a4c52fb119
commit
e197e45566
12
src/IO.f90
12
src/IO.f90
|
@ -320,6 +320,7 @@ function IO_rmComment(line)
|
||||||
|
|
||||||
character(len=*), intent(in) :: line
|
character(len=*), intent(in) :: line
|
||||||
character(len=:), allocatable :: IO_rmComment
|
character(len=:), allocatable :: IO_rmComment
|
||||||
|
|
||||||
integer :: split
|
integer :: split
|
||||||
|
|
||||||
|
|
||||||
|
@ -335,7 +336,7 @@ end function IO_rmComment
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! @brief Return first (with glued on second if they differ)
|
! @brief Return first (with glued on second if they differ).
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function IO_glueDiffering(first,second,glue)
|
function IO_glueDiffering(first,second,glue)
|
||||||
|
|
||||||
|
@ -343,14 +344,11 @@ function IO_glueDiffering(first,second,glue)
|
||||||
character(len=*), intent(in) :: second
|
character(len=*), intent(in) :: second
|
||||||
character(len=*), optional, intent(in) :: glue
|
character(len=*), optional, intent(in) :: glue
|
||||||
character(len=:), allocatable :: IO_glueDiffering
|
character(len=:), allocatable :: IO_glueDiffering
|
||||||
|
|
||||||
character(len=pSTRLEN) :: glue_
|
character(len=pSTRLEN) :: glue_
|
||||||
|
|
||||||
if (present(glue)) then
|
|
||||||
glue_ = glue
|
|
||||||
else
|
|
||||||
glue_ = '<--'
|
|
||||||
end if
|
|
||||||
|
|
||||||
|
glue_ = misc_optional(glue,'<--')
|
||||||
IO_glueDiffering = trim(first)
|
IO_glueDiffering = trim(first)
|
||||||
if (trim(first) /= trim(second)) IO_glueDiffering = IO_glueDiffering//' '//trim(glue_)//' '//trim(second)
|
if (trim(first) /= trim(second)) IO_glueDiffering = IO_glueDiffering//' '//trim(glue_)//' '//trim(second)
|
||||||
|
|
||||||
|
@ -363,9 +361,9 @@ end function IO_glueDiffering
|
||||||
function IO_intAsStr(i)
|
function IO_intAsStr(i)
|
||||||
|
|
||||||
integer, intent(in) :: i
|
integer, intent(in) :: i
|
||||||
|
|
||||||
character(len=:), allocatable :: IO_intAsStr
|
character(len=:), allocatable :: IO_intAsStr
|
||||||
|
|
||||||
|
|
||||||
allocate(character(len=merge(2,1,i<0) + floor(log10(real(abs(merge(1,i,i==0))))))::IO_intAsStr)
|
allocate(character(len=merge(2,1,i<0) + floor(log10(real(abs(merge(1,i,i==0))))))::IO_intAsStr)
|
||||||
write(IO_intAsStr,'(i0)') i
|
write(IO_intAsStr,'(i0)') i
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue