summaryrefslogtreecommitdiff
path: root/map65/libm65/graycode65.f90
blob: 2129a14638cd4e0ec643ce9479ab4b9559f5edc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module graycode65_mod
  implicit none

  ! Fortran-only interface to igray
  interface
    integer function igray(n, idir)
      integer, intent(in) :: n, idir
    end function igray
  end interface

contains

  subroutine graycode65(dat, n, idir)
    integer, intent(in)    :: n, idir
    integer, intent(inout) :: dat(n)
    integer :: i

    do i = 1, n
       dat(i) = igray(dat(i), idir)
    enddo
  end subroutine graycode65

end module graycode65_mod