ishift Subroutine

subroutine ishift(l, n, k)

Arguments

Type IntentOptional AttributesName
integer :: l
integer :: n
integer :: k

Contents

Source Code


Source Code

      subroutine ishift(l,n,k)
      implicit double precision (a-h,o-z)
      dimension l(*)
      if (k>0) then
        do i=1,n
          l(i)=l(i+k)
        end do
      else if (k<0) then
        do i=n,1,-1
          l(i)=l(i+k)
        end do
      end if
      end subroutine ishift