主题:问下前辈一个低级问题
在这里面,为什么那个地方一定要用分号而不能用逗号啊
PROGRAM NESTED_PROCEDURE
IMPLICIT NONE
REAL::X1,X2,X,E,CALU
PRINT*,'Please input X1,X2,E'
READ*,X1,X2,E
DO WHILE(ABS(X2-X1)>E)
[color=008000]X2=CALU(X1,X2);X1=X2[/color]
END DO
PRINT*,X2
END PROGRAM NESTED_PROCEDURE
!---------------------------------------------------
FUNCTION ROOT(X) RESULT(ROOT_RESULT)
IMPLICIT NONE
REAL,INTENT(IN)::X
REAL::ROOT_RESULT
ROOT_RESULT=X**3-5*X**2+16*X-80
END FUNCTION ROOT
!---------------------------------------------------
FUNCTION CALU(X1,X2) RESULT(CALU_RESULT)
IMPLICIT NONE
REAL,INTENT(IN)::X1,X2
REAL::CALU_RESULT,ROOT
CALU_RESULT=X2-ROOT(X2)/(ROOT(X2)-ROOT(X1))*(X2-X1)
END FUNCTION CALU
PROGRAM NESTED_PROCEDURE
IMPLICIT NONE
REAL::X1,X2,X,E,CALU
PRINT*,'Please input X1,X2,E'
READ*,X1,X2,E
DO WHILE(ABS(X2-X1)>E)
[color=008000]X2=CALU(X1,X2);X1=X2[/color]
END DO
PRINT*,X2
END PROGRAM NESTED_PROCEDURE
!---------------------------------------------------
FUNCTION ROOT(X) RESULT(ROOT_RESULT)
IMPLICIT NONE
REAL,INTENT(IN)::X
REAL::ROOT_RESULT
ROOT_RESULT=X**3-5*X**2+16*X-80
END FUNCTION ROOT
!---------------------------------------------------
FUNCTION CALU(X1,X2) RESULT(CALU_RESULT)
IMPLICIT NONE
REAL,INTENT(IN)::X1,X2
REAL::CALU_RESULT,ROOT
CALU_RESULT=X2-ROOT(X2)/(ROOT(X2)-ROOT(X1))*(X2-X1)
END FUNCTION CALU