1 2 3 4 5 6 7 8 9
subroutine graycode(ia,n,idir,ib) integer ia(n),ib(n) do i=1,n ib(i)=igray(ia(i),idir) enddo return end subroutine graycode