!     CHRMAIN.FOR  Copyright(c) 1998, Lahey Computer Systems, Inc.
!     Copying for sale requires permission from Lahey Computers Systems.
!     Otherwise, distribution of all or part of this file is permitted
!     if these four lines are included.
!
      PROGRAM MAIN
      integer :: i,j
      integer(kind=1) :: k1, i1add
      integer(kind=2) :: k2, i2add
      integer(kind=4) :: k4, i4add
      real(kind=4) :: r4, r4add
      real(kind=4) :: r8, r8add
      external :: i1add, i2add, i4add, r4add, r8add
!
      i = 12
      j = 43
      k1 = 0; k2 = 0; k4 = 0
      print *, 'Before: i,j=',i,j
      k1 = i1add(i,j)
      k2 = i2add(i,j)
      k4 = i4add(i,j)
      print *, 'After:  k1,k2,k4=',k1,k2,k4
      r4 = r4add(i,j)
      r8 = r8add(i,j)
      print *, 'r4,r8=',r4,r8
!
      stop
      end
