upper Function

private elemental function upper(string)

Arguments

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

Return Value character(len=len)


Called by

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

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