!///////////////////////////////////////////////////////////////////
!//
!// lsptest.f90
!//
!// A program to tehst the subroutine linspace
!//
!///////////////////////////////////////////////////////////////////

PROGRAM lsptest
  IMPLICIT NONE
  !// The array
  REAL(KIND=8),DIMENSION(10)                     :: A
  !// The start value
  REAL(KIND=8)                                   :: s
  !// The end value
  REAL(KIND=8)                                   :: e
  
  !// The interface to the linspace subroutine
  INTERFACE lsp
    SUBROUTINE linspace(V,s_value,e_value)
      !// The array recieving the linear spaced values
      REAL(KIND=8),DIMENSION(:),INTENT(INOUT)    :: V
      !// The start value of the array
      REAL(KIND=8),INTENT(IN)                    :: s_value
      !// The end value fo the array
      REAL(KIND=8),INTENT(IN)                    :: e_value
      END SUBROUTINE linspace
  END INTERFACE lsp

  !// Initialize the array
  A = 0.0D0
  s = 0.0D0
  e = 5.0D0
  
  CALL linspace(A,s,e)
  PRINT *, A(:)
END PROGRAM lsptest