単純な Fortran コードを使用していますが、解決策が見つからないエラーが発生します。これを修正する方法を知っている人はいますか?
subroutine sort(A,A_done,N,P)
! Sort a real array by algebraically increasing value and return the permutation that
! rearranges the array
implicit none
Integer N, TEMP1, K, L, P(N), TEMP2
real(8), dimension(:) :: A_done
real(8), dimension(:) :: A
DO K=1, N-1
DO L=K+1, N
if A(K)>A(L)
TEMP1=A(K)
TEMP2=P(K)
A(K)=A(L)
P(K)=P(L)
A(L)=TEMP1
P(L)=TEMP2
end if
END DO
END DO
A_done=A
RETURN
END
gfortran -Wall -Werror -fbounds-check -w -L -lm -o シミュレーション readinput.for nooutfile.for mean.for covariance.for correlation.for rperm.for simmain.for sort.for ファイル内 sort.for:13
if A(K)>A(L)
1
Error: Unclassifiable statement at (1) ファイル sort.for:20
end if
1
Error: Expecting END DO statement at (1) make: * [Simulation] Error 1
助けてくれてありがとう