Upper_Case Function

private function Upper_Case(string)

The Upper_Case function converts the lower case characters of a string to upper case one. \LIBVTKIO uses this function in order to achieve case-insensitive: all character variables used within \LIBVTKIO functions are pre-processed by Uppper_Case function before these variables are used. So the users can call \LIBVTKIO functions whitout pay attention of the case of the kwywords passed to the functions: calling the function VTK_INI with the string \code{E_IO = VTK_INI('Ascii',…)} or with the string \code{E_IO = VTK_INI('AscII',…)} is equivalent.

Upper_Case function is private and cannot be called outside \LIBVTKIO. If you are interested to use it change its scope to public.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: string

Return Value character(len=len(string))


Called by

proc~~upper_case~~CalledByGraph proc~upper_case Upper_Case proc~vtk_dat_xml VTK_DAT_XML proc~vtk_dat_xml->proc~upper_case proc~vtk_var_vect_r4 VTK_VAR_VECT_R4 proc~vtk_var_vect_r4->proc~upper_case proc~vtm_blk_xml VTM_BLK_XML proc~vtm_blk_xml->proc~upper_case proc~vtk_var_vect_r8 VTK_VAR_VECT_R8 proc~vtk_var_vect_r8->proc~upper_case proc~vtk_ini_xml VTK_INI_XML proc~vtk_ini_xml->proc~upper_case proc~vtk_ini VTK_INI proc~vtk_ini->proc~upper_case proc~vtk_dat VTK_DAT proc~vtk_dat->proc~upper_case proc~save_fe_f_vtk save_fe_f_vtk proc~save_fe_f_vtk->proc~vtk_ini proc~save_fe_f_vtk->proc~vtk_dat interface~vtk_var VTK_VAR proc~save_fe_f_vtk->interface~vtk_var interface~vtk_var->proc~vtk_var_vect_r4 interface~vtk_var->proc~vtk_var_vect_r8

Contents

Source Code


Source Code

  function Upper_Case(string)
  !---------------------------------------------------------------------------------------------------------------------------------
  !!The Upper\_Case function converts the lower case characters of a string to upper case one. \LIBVTKIO uses this function in
  !!order to achieve case-insensitive: all character variables used within \LIBVTKIO functions are pre-processed by
  !!Uppper\_Case function before these variables are used. So the users can call \LIBVTKIO functions whitout pay attention of the
  !!case of the kwywords passed to the functions: calling the function VTK\_INI with the string \code{E_IO = VTK_INI('Ascii',...)}
  !!or with the string  \code{E_IO = VTK_INI('AscII',...)} is equivalent.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  implicit none
  character(len=*), intent(IN):: string     ! string to be converted
  character(len=len(string))::   Upper_Case ! converted string
  integer::                      n1         ! characters counter
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  !!The following is the code snippet of Upper\_Case function.
  !!
  !(\doc)codesnippet
  Upper_Case = string
  do n1=1,len(string)
    select case(ichar(string(n1:n1)))
    case(97:122)
      Upper_Case(n1:n1)=char(ichar(string(n1:n1))-32) ! Upper case conversion
    endselect
  enddo
  return
  !(doc/)codesnippet
  !!Upper\_Case function is private and cannot be called outside \LIBVTKIO. If you are interested to use it change its scope
  !!to public.
  !---------------------------------------------------------------------------------------------------------------------------------
  endfunction Upper_Case