Statistiques
| Révision :

root / src / upcase.f90 @ 4

Historique | Voir | Annoter | Télécharger (506 octet)

1
      SUBROUTINE Upcase(String)
2

    
3
! This subroutine converts a string into its Upcase
4
! version
5

    
6
        integer, parameter :: KINT = kind(1)
7
        integer, parameter :: KREAL = kind(1.0d0)
8

    
9
        CHARACTER(*), INTENT(INOUT) :: String
10
        INTEGER(KINT) :: i,ic, length
11
        length=len_trim(string)
12
        DO I=1, length
13
          ic=ICHAR(String(i:i))
14
          if ((ic.ge.97).and.(ic.le.122)) ic=ic-32
15
          String(i:i)=ACHAR(ic)
16
        END DO
17

    
18
        RETURN
19
      END SUBROUTINE Upcase
20