主题:求助 argument 有关问题
程序代码如下:
PROGRAM MAIN
IMPLICIT NONE
TYPE::CURVE_MOD
REAL*8:: P_L
REAL*8:: P_C
REAL*8:: CUR
REAL*8:: F_C
REAL*8:: F_L
REAL*8:: R
REAL*8:: C
REAL*8:: H
REAL*8:: SEC(5)
INTEGER:: TRANSITION_TYPE
END TYPE CURVE_MOD
TYPE(CURVE_MOD):: CUR(1)
REAL*8:: G
REAL*8:: SPEED, DISTANCE
REAL*8:: V
REAL*8:: OMEGA
REAL*8:: R0
REAL*8:: X
REAL*8:: C(3)
REAL*8:: FSE(3)
V=250.0D0
SPEED=v/3.6d0
V=V/3.6d0
DISTANCE=500
CUR(1).P_L=DISTANCE
CUR(1).P_C=0.0D0
CUR(1).CUR=0.0D0
CUR(1).F_C=0.0D0
CUR(1).F_L=0.0D0
CUR(1).R=0.0D0
CUR(1).H=0.0D0
CALL CURVE(100.d0,C,FSE,CUR,V)
END PROGRAM
SUBROUTINE CURVE(X,C,FSE,CUR,V)
IMPLICIT NONE
REAL*8:: X,C(3),FSE(3),V
TYPE::CURVE_MOD
REAL*8:: P_L
REAL*8:: P_C
REAL*8:: CUR
REAL*8:: F_C
REAL*8:: F_L
REAL*8:: R
REAL*8:: C
REAL*8:: H
REAL*8:: SEC(5)
INTEGER:: TRANSITION_TYPE
END TYPE CURVE_MOD
TYPE(CURVE_MOD):: CUR(1)
CUR(1).C=1.0D0/CUR(1).R
CUR(1).SEC(1)=CUR(1).P_L
CUR(1).SEC(2)=CUR(1).P_L+CUR(1).P_C
CUR(1).SEC(3)=CUR(1).P_L+CUR(1).P_C+CUR(1).CUR
CUR(1).SEC(4)=CUR(1).P_L+CUR(1).P_C+CUR(1).CUR+CUR(1).F_C
CUR(1).SEC(5)=CUR(1).P_L+CUR(1).P_C+CUR(1).CUR+CUR(1).F_C+CUR(1).F_L
IF(X .LT. CUR(1).SEC(1))THEN
C(1)=0.0D0
C(2)=0.0D0
C(3)=0.0D0
FSE(1)=0.0D0
FSE(2)=0.0D0
FSE(3)=0.0D0
ELSEIF(CUR(1).SEC(1) .LT. X .AND. X .LT. CUR(1).SEC(2))THEN
C(1)=(X-CUR(1).SEC(1))*CUR(1).C/CUR(1).P_C
C(2)=V*CUR(1).C/CUR(1).P_C
C(3)=0.0D0
FSE(1)=CUR(1).H*(X-CUR(1).SEC(1))/CUR(1).P_C/1.5
FSE(2)=CUR(1).H*V/CUR(1).P_C/1.5
FSE(3)=0.0D0
ELSEIF(CUR(1).SEC(2) .LE. X .AND. X .LE. CUR(1).SEC(3))THEN
C(1)=CUR(1).C
C(2)=0.0D0
C(3)=0.0D0
FSE(1)=CUR(1).H/1.5
FSE(2)=0.0D0
FSE(3)=0.0D0
ELSEIF(CUR(1).SEC(3) .LT. X .AND. X .LT. CUR(1).SEC(4))THEN
C(1)=(CUR(1).F_C-(X-CUR(1).SEC(3)))*CUR(1).C/CUR(1).F_C
C(2)=-V*CUR(1).C/CUR(1).F_C
C(3)=0.0D0
FSE(1)=CUR(1).H*(CUR(1).F_C-(X-CUR(1).SEC(3)))/CUR(1).F_C/1.5
FSE(2)=-CUR(1).H*V/CUR(1).F_C/1.5
FSE(3)=0.0D0
ENDIF
END SUBROUTINE
使用ivf调试时,出现 error6633: the type of actural argument differs from the type of the dummy argument,请各位指正问题所在,谢谢!
PROGRAM MAIN
IMPLICIT NONE
TYPE::CURVE_MOD
REAL*8:: P_L
REAL*8:: P_C
REAL*8:: CUR
REAL*8:: F_C
REAL*8:: F_L
REAL*8:: R
REAL*8:: C
REAL*8:: H
REAL*8:: SEC(5)
INTEGER:: TRANSITION_TYPE
END TYPE CURVE_MOD
TYPE(CURVE_MOD):: CUR(1)
REAL*8:: G
REAL*8:: SPEED, DISTANCE
REAL*8:: V
REAL*8:: OMEGA
REAL*8:: R0
REAL*8:: X
REAL*8:: C(3)
REAL*8:: FSE(3)
V=250.0D0
SPEED=v/3.6d0
V=V/3.6d0
DISTANCE=500
CUR(1).P_L=DISTANCE
CUR(1).P_C=0.0D0
CUR(1).CUR=0.0D0
CUR(1).F_C=0.0D0
CUR(1).F_L=0.0D0
CUR(1).R=0.0D0
CUR(1).H=0.0D0
CALL CURVE(100.d0,C,FSE,CUR,V)
END PROGRAM
SUBROUTINE CURVE(X,C,FSE,CUR,V)
IMPLICIT NONE
REAL*8:: X,C(3),FSE(3),V
TYPE::CURVE_MOD
REAL*8:: P_L
REAL*8:: P_C
REAL*8:: CUR
REAL*8:: F_C
REAL*8:: F_L
REAL*8:: R
REAL*8:: C
REAL*8:: H
REAL*8:: SEC(5)
INTEGER:: TRANSITION_TYPE
END TYPE CURVE_MOD
TYPE(CURVE_MOD):: CUR(1)
CUR(1).C=1.0D0/CUR(1).R
CUR(1).SEC(1)=CUR(1).P_L
CUR(1).SEC(2)=CUR(1).P_L+CUR(1).P_C
CUR(1).SEC(3)=CUR(1).P_L+CUR(1).P_C+CUR(1).CUR
CUR(1).SEC(4)=CUR(1).P_L+CUR(1).P_C+CUR(1).CUR+CUR(1).F_C
CUR(1).SEC(5)=CUR(1).P_L+CUR(1).P_C+CUR(1).CUR+CUR(1).F_C+CUR(1).F_L
IF(X .LT. CUR(1).SEC(1))THEN
C(1)=0.0D0
C(2)=0.0D0
C(3)=0.0D0
FSE(1)=0.0D0
FSE(2)=0.0D0
FSE(3)=0.0D0
ELSEIF(CUR(1).SEC(1) .LT. X .AND. X .LT. CUR(1).SEC(2))THEN
C(1)=(X-CUR(1).SEC(1))*CUR(1).C/CUR(1).P_C
C(2)=V*CUR(1).C/CUR(1).P_C
C(3)=0.0D0
FSE(1)=CUR(1).H*(X-CUR(1).SEC(1))/CUR(1).P_C/1.5
FSE(2)=CUR(1).H*V/CUR(1).P_C/1.5
FSE(3)=0.0D0
ELSEIF(CUR(1).SEC(2) .LE. X .AND. X .LE. CUR(1).SEC(3))THEN
C(1)=CUR(1).C
C(2)=0.0D0
C(3)=0.0D0
FSE(1)=CUR(1).H/1.5
FSE(2)=0.0D0
FSE(3)=0.0D0
ELSEIF(CUR(1).SEC(3) .LT. X .AND. X .LT. CUR(1).SEC(4))THEN
C(1)=(CUR(1).F_C-(X-CUR(1).SEC(3)))*CUR(1).C/CUR(1).F_C
C(2)=-V*CUR(1).C/CUR(1).F_C
C(3)=0.0D0
FSE(1)=CUR(1).H*(CUR(1).F_C-(X-CUR(1).SEC(3)))/CUR(1).F_C/1.5
FSE(2)=-CUR(1).H*V/CUR(1).F_C/1.5
FSE(3)=0.0D0
ENDIF
END SUBROUTINE
使用ivf调试时,出现 error6633: the type of actural argument differs from the type of the dummy argument,请各位指正问题所在,谢谢!