best Function

private pure function best(c1, c2) result(res)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: c1
character(len=*), intent(in) :: c2

Return Value character(len=:), allocatable


Source Code

   pure function best(c1, c2) result(res)
      implicit none
      character(*), intent(in) :: c1, c2
      character(:), allocatable :: res

      integer :: max_len
      res = theta
      if (len_trim(c1) > len_trim(c2)) then
         res = trim(adjustl(c1))
      else
         res = trim(adjustl(c2))
      end if
   end function best