初学fortran,以下程序不知道错在哪里
kind.f90:
program kind
implicit none
integer, parameter :: k = kind(1)
integer, parameter :: r = range(1)
print *, k, r
end program kind
用gfortran编译的错误信息如下:
PS F:\FORTRAN> gfortran.exe .\kind.f90 -o kind
.\kind.f90:4:33:
4 | integer, parameter :: k = kind(1)
| 1
Error: Symbol at (1) is not appropriate for an expression
.\kind.f90:6:12:
6 | print *, k, r
| 1
Error: Symbol 'k' at (1) has no IMPLICIT type
求大佬指教