[cig-commits] [commit] Hiro_latest: Add subroutines to convert upper or lower cases (1284793)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Mon Nov 18 16:21:06 PST 2013


Repository : ssh://geoshell/calypso

On branch  : Hiro_latest
Link       : https://github.com/geodynamics/calypso/compare/93e9f8f974c7a247c8f02e54ec18de063f86c8fb...3c548304673360ddedd7d68c8095b3fb74a2b9ce

>---------------------------------------------------------------

commit 1284793ab64348dc44222b14b0d77fdb26b851fa
Author: Hiroaki Matsui <h_kemono at mac.com>
Date:   Wed Oct 23 14:44:22 2013 -0700

    Add subroutines to convert upper or lower cases


>---------------------------------------------------------------

1284793ab64348dc44222b14b0d77fdb26b851fa
 .../SERIAL_src/IO/skip_comment_f.f90               | 63 ++++++++++++++++++----
 1 file changed, 52 insertions(+), 11 deletions(-)

diff --git a/src/Fortran_libraries/SERIAL_src/IO/skip_comment_f.f90 b/src/Fortran_libraries/SERIAL_src/IO/skip_comment_f.f90
index e108cfc..6bc147e 100644
--- a/src/Fortran_libraries/SERIAL_src/IO/skip_comment_f.f90
+++ b/src/Fortran_libraries/SERIAL_src/IO/skip_comment_f.f90
@@ -1,14 +1,21 @@
-!
-!      module skip_comment_f
-!
-!        programmed by H.Matsui and H.Okuda
-!                                    on Feb. 2001 (ver 1.2)
-!
-!      subroutine skip_comment(character_4_read,id_file)
-!      subroutine count_field_by_comma(id_file, charabuf,               &
-!     &          ncomp, field_name)
-!      subroutine read_stack_array(character_4_read, id_file, num,      &
-!     &          istack_array)
+!>@file   skip_comment_f.f90
+!!@brief  module skip_comment_f
+!!
+!!@authorH.Matsui and H.Okuda
+!!@date Programmed  H. Matsui in  Feb. 2001 
+!
+!> @brief subroutines to find comment lines in data
+!!
+!!@verbatim
+!!      subroutine skip_comment(character_4_read,id_file)
+!!      subroutine count_field_by_comma(id_file, charabuf,              &
+!!     &          ncomp, field_name)
+!!      subroutine read_stack_array(character_4_read, id_file, num,     &
+!!     &          istack_array)
+!!
+!!      subroutine change_2_upper_case(string)
+!!      subroutine change_2_lower_case(string)
+!!@endverbatim
 !
       module skip_comment_f
 !
@@ -118,4 +125,38 @@
 !
 !-----------------------------------------------------------------------
 !
+      subroutine change_2_upper_case(string)
+!
+      character(len=kchara), intent(inout) :: string
+      integer(kind = kint) :: i, len
+!
+!
+      len = len_trim(string)
+      do i = 1, len
+        if (string(i:i) .ge. 'a' .and. string(i:i) .le. 'z') then 
+          string(i:i) = char(ichar(string(i:i)) - 32)
+        end if
+      end do
+!
+      end subroutine change_2_upper_case
+!
+!-----------------------------------------------------------------------
+!
+      subroutine change_2_lower_case(string)
+!
+      character(len=kchara), intent(inout) :: string
+      integer(kind = kint) :: i, len
+!
+!
+      len = len_trim(string)
+      do i = 1, len
+        if (string(i:i) .ge. 'A' .and. string(i:i) .le. 'Z') then 
+          string(i:i) = char(ichar(string(i:i)) + 32)
+        end if
+      end do
+!
+      end subroutine change_2_lower_case
+!
+!-----------------------------------------------------------------------
+!
       end module skip_comment_f



More information about the CIG-COMMITS mailing list