主题:求助fortran语法错误。。帮我看下这几句代码
小弟准备写c#调用fortran的程序,结果fortran中出现错误。
SUBROUTINE InvA(A,n)
[color=008000]IMPLICIT NONE !强制类型声明
!DEC$ ATTRIBUTES DLLEXPORT::InvA !例程导出声明
!DEC$ ATTRIBUTES ALIAS:'InvA'::InvA !给例程规定别名
!DEC$ ATTRIBUTES REFERENCE::A!引用传递
!DEC$ ATTRIBUTES REFERENCE::n!引用传递[/color]
INTEGER(4):: n,k,i,j,t
[color=FF00FF]t=int(n*(n+1)/2)[/color]---这儿是不是有错啊?
REAL(8)::A(t),A0(n),a00,ai0
DO k=1,n
a00=A(1)
……
[color=FF0000][size=4]error #6236: A specification statement cannot appear in the executable section. [/size][/color]
SUBROUTINE InvA(A,n)
[color=008000]IMPLICIT NONE !强制类型声明
!DEC$ ATTRIBUTES DLLEXPORT::InvA !例程导出声明
!DEC$ ATTRIBUTES ALIAS:'InvA'::InvA !给例程规定别名
!DEC$ ATTRIBUTES REFERENCE::A!引用传递
!DEC$ ATTRIBUTES REFERENCE::n!引用传递[/color]
INTEGER(4):: n,k,i,j,t
[color=FF00FF]t=int(n*(n+1)/2)[/color]---这儿是不是有错啊?
REAL(8)::A(t),A0(n),a00,ai0
DO k=1,n
a00=A(1)
……
[color=FF0000][size=4]error #6236: A specification statement cannot appear in the executable section. [/size][/color]