to_upper Function

public pure function to_upper(input_string) result(output_string)

@brief return string in upper case @author Igor S. Gerasimov @date Sep, 2019 --Initial release-- @date May, 2021 Moved to strings @date Sep, 2021 subroutine -> function @param line - (in)

Arguments

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

Return Value character(len=:), allocatable


Called by

proc~~to_upper~~CalledByGraph proc~to_upper to_upper proc~atomic_structure_center atomic_structure%atomic_structure_center proc~atomic_structure_center->proc~to_upper proc~get_element_id get_element_id proc~get_element_id->proc~to_upper none~from_file~2 basis_library_t%from_file none~from_file~2->proc~get_element_id proc~get_td_transition_dipole get_td_transition_dipole proc~get_td_transition_dipole->proc~atomic_structure_center proc~get_transition_dipole get_transition_dipole proc~get_transition_dipole->proc~atomic_structure_center none~from_file basis_set%from_file none~from_file->none~from_file~2 proc~tdhf_energy tdhf_energy proc~tdhf_energy->proc~get_td_transition_dipole proc~tdhf_mrsf_energy tdhf_mrsf_energy proc~tdhf_mrsf_energy->proc~get_transition_dipole proc~tdhf_sf_energy tdhf_sf_energy proc~tdhf_sf_energy->proc~get_transition_dipole proc~guess_huckel guess_huckel proc~guess_huckel->none~from_file proc~tdhf_energy_c tdhf_energy_C proc~tdhf_energy_c->proc~tdhf_energy proc~tdhf_mrsf_energy_c tdhf_mrsf_energy_C proc~tdhf_mrsf_energy_c->proc~tdhf_mrsf_energy proc~tdhf_sf_energy_c tdhf_sf_energy_C proc~tdhf_sf_energy_c->proc~tdhf_sf_energy proc~guess_huckel_c guess_huckel_C proc~guess_huckel_c->proc~guess_huckel

Source Code

  pure function to_upper(input_string) result(output_string)
    character(*), intent(in) :: input_string
    character(:), allocatable :: output_string
    integer :: i, ic
    output_string = input_string
    do i = 1, len(output_string)
      ic = iachar(output_string(i:i))
      if (ic <= Z_LOWER .and. ic >= A_LOWER) then
        output_string(i:i) = achar(ic-UPPER_TO_LOWER)
      end if
    end do
  end function to_upper