File: upcase.f

package info (click to toggle)
aces3 3.0.6-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 82,460 kB
  • sloc: fortran: 225,647; ansic: 20,413; cpp: 4,349; makefile: 953; sh: 137
file content (17 lines) | stat: -rw-r--r-- 425 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
      subroutine upcase(str)
      implicit none
      character*(*) str
      integer l,i,n,d
      integer iachar, iBigA, iSmlA, iSmlZ
      character*(1) achar
      iBigA = iachar('A')
      iSmlA = iachar('a')
      iSmlZ = iachar('z')
      d = iBigA-iSmlA
      l=len(str)
      do i=1,l
         n = iachar(str(i:i))
         if (iSmlA.le.n .and. n.le.iSmlZ) str(i:i) = achar(n+d)
      end do
      return
      end