Statistiques
| Révision :

root / src / upcase.f90 @ 3

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

1
      SUBROUTINE Upcase(String)
2

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

    
6
        IMPLICIT NONE
7

    
8
        integer, parameter :: KINT = kind(1)
9

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

    
19
        RETURN
20
      END SUBROUTINE Upcase
21