upper Function

private elemental function upper(string)

Arguments

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

Return Value character(len=len)


Called by

proc~~upper~~CalledByGraph proc~upper upper proc~colorize_ascii colorize_ascii proc~colorize_ascii->proc~upper proc~colorize_default colorize_default proc~colorize_default->proc~upper proc~colorize_ucs4 colorize_ucs4 proc~colorize_ucs4->proc~upper interface~colorize colorize interface~colorize->proc~colorize_default proc~colorize_str colorize_str proc~colorize_str->interface~colorize proc~styles_samples styles_samples proc~styles_samples->interface~colorize proc~colorize_str~2 colorize_str proc~colorize_str~2->interface~colorize program~face_test_colors face_test_colors program~face_test_colors->interface~colorize program~face_test_styles~2 face_test_styles program~face_test_styles~2->interface~colorize program~face_test_styles~3 face_test_styles program~face_test_styles~3->interface~colorize program~face_test_colors~4 face_test_colors program~face_test_colors~4->interface~colorize proc~colors_samples colors_samples proc~colors_samples->interface~colorize program~face_test_styles face_test_styles program~face_test_styles->interface~colorize program~face_test_colors~2 face_test_colors program~face_test_colors~2->interface~colorize program~face_test_colors~3 face_test_colors program~face_test_colors~3->interface~colorize program~face_test_styles~4 face_test_styles program~face_test_styles~4->interface~colorize program~face_test_basic face_test_basic program~face_test_basic->proc~styles_samples program~face_test_basic->proc~colors_samples program~face_test_basic~2 face_test_basic program~face_test_basic~2->proc~styles_samples program~face_test_basic~2->proc~colors_samples program~face_test_basic~3 face_test_basic program~face_test_basic~3->proc~styles_samples program~face_test_basic~3->proc~colors_samples program~face_test_basic~4 face_test_basic program~face_test_basic~4->proc~styles_samples program~face_test_basic~4->proc~colors_samples

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