Topic: A simple clock timer
The following works well in Fortran 95:
!Timer variables
real(4) :: time1, time2
!Start timer
time1=secnds(0.0)
(do stuff)
! Stop timer and write
time2=secnds(time1)
WRITE (*,'(A,F8.2)') "Time (sec):", time2
But in Fortran 77 I get these error messages:
time1=secnds(0.0)
1
Error: Syntax error in DATA statement at (1)
time2=secnds(time1)
1
Error: 'x' argument of 'secnds' intrinsic at (1) must be of kind 4
Any ideas?