UpperCase Function

public function UpperCase(str) result(Upper)

Arguments

TypeIntentOptionalAttributesName
character, intent(in) :: str

Return Value character


Called by

proc~~uppercase~~CalledByGraph proc~uppercase UpperCase proc~settimeintegrator_withchar SetTimeIntegrator_withChar proc~settimeintegrator_withchar->proc~uppercase

Contents

Source Code


Source Code

  function UpperCase(str) result(upper)

    implicit none
    character(*),intent(In) :: str
    character(len(str))      :: Upper

    integer :: ic,i

    character(27),parameter :: cap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ '
    character(27),parameter :: low = 'abcdefghijklmnopqrstuvwxyz '

    do i = 1,len(str)
      ic = index(low,str(i:i))
      if(ic > 0) then
        Upper(i:i) = cap(ic:ic)
      else
        Upper(i:i) = str(i:i)
      endif
    enddo

  endfunction UpperCase