use existing functionality

This commit is contained in:
Martin Diehl 2023-06-22 23:25:25 +02:00
parent a4c52fb119
commit e197e45566
1 changed files with 5 additions and 7 deletions

View File

@ -320,6 +320,7 @@ function IO_rmComment(line)
character(len=*), intent(in) :: line
character(len=:), allocatable :: IO_rmComment
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)
@ -343,14 +344,11 @@ function IO_glueDiffering(first,second,glue)
character(len=*), intent(in) :: second
character(len=*), optional, intent(in) :: glue
character(len=:), allocatable :: IO_glueDiffering
character(len=pSTRLEN) :: glue_
if (present(glue)) then
glue_ = glue
else
glue_ = '<--'
end if
glue_ = misc_optional(glue,'<--')
IO_glueDiffering = trim(first)
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)
integer, intent(in) :: i
character(len=:), allocatable :: 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