I found this subroutine on this link : generate a sequence array in fortran
I want to use this subroutine for my homework. But I can't use it and don't know why it didn't play
Error code is as follows
Error: Keyword argument requires explicit interface for procedure 'linspace' at (1)
SUBROUTINE linspace(from, to, array)
REAL(8), intent(in) :: from, to
REAL(8), intent(out) :: array(:)
REAL(8) :: range
integer :: n, i
n = size(array)
range = to - from
IF (n == 0) return
IF (n == 1) then
array(1) = from
return
END IF
DO i=2, n
array(i) = from + range * (i - 1) / (n - 1)
END DO
END SUBROUTINE linspace
PROGRAM decay
IMPLICIT NONE
REAL :: k, c0, dt
REAL, DIMENSION(15) :: c_e, c_i
REAL(8) :: t(5)
k = 0.0001
c0 = 100
dt = 60*60
c_e(1) = 100
c_i(1) = 100
call linspace(from=0.0, to=3600.0, array=t)
print *, t
STOP
END PROGRAM decay