upper Function

private elemental function upper(string)

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: string

Return Value character(len=len)


Called by

proc~~upper~4~~CalledByGraph proc~upper~4 upper proc~colorize_ascii~3 colorize_ascii proc~colorize_ascii~3->proc~upper~4 proc~colorize_default~3 colorize_default proc~colorize_default~3->proc~upper~4 proc~colorize_ucs4~3 colorize_ucs4 proc~colorize_ucs4~3->proc~upper~4 interface~colorize~3 colorize interface~colorize~3->proc~colorize_default~3 proc~colors_samples~3 colors_samples proc~colors_samples~3->interface~colorize~3 proc~styles_samples~3 styles_samples proc~styles_samples~3->interface~colorize~3

Contents

Source Code


Source Code

   elemental function upper(string)
   !< Return a string with all uppercase characters.
   character(len=*), intent(in) :: string !< Input string.
   character(len=len(string))   :: upper  !< Upper case string.
   integer                      :: n1     !< Characters counter.
   integer                      :: n2     !< Characters counter.

   upper = string
   do n1=1, len(string)
      n2 = index(LOWER_ALPHABET, string(n1:n1))
      if (n2>0) upper(n1:n1) = UPPER_ALPHABET(n2:n2)
   enddo
   endfunction upper