|
这是Fortran当中的子例行程序
[Fortran] 纯文本查看 复制代码 SUBROUTINE start(nvacs,nint,ns,nm,nmat,nnbrs,nlcx,nlcy,nlcz,nlc)
!DEC$ ATTRIBUTES DLLEXPORT::start
!DEC$ ATTRIBUTES STDCALL,ALIAS:'start'::start
!根据变量名称的第一个字母来决定变量的类型 ijklmn
implicit real*8 ( a-h,o-z )
integer*4 tv0001
!ijklmn
integer:: nvacs,nint,ns,nm,nmat,nnbrs,nlcx,nlcy,nlcz,nlc
! include 'para.inc'
real*8,dimension(nm):: x0,y0,z0,xorg,yorg,
&zorg,stry,strz
Integer,dimension(nm)::lflag,lflagbi,nvbiflag,link,neigh,
& neigh2,nsametype,nheterotype,ispec,neighheto
这是c#当中的代码
//调用Fortran中的dll,以及子例行程序
[DllImport("cnadll.dll", CallingConvention = CallingConvention.StdCall)]
public static extern void start( int nvacs,int nint, int ns,int nm, int nmat,int nnbrs, int nlcx,int nlcy,int nlcz,int nlc);
调用时的代码
int nvacs=0;
int nint = 0; int ns = 8119; int nm = 8119; int nmat = 3; int nnbrs = 8000; int nlcx = 10; int nlcy = 10; int nlcz = 10; int nlc = 1000;
mainwindow.start(nvacs, nint, ns, nm, nmat, nnbrs, nlcx, nlcy, nlcz, nlc);
但是执行到mainwindow.start(nvacs, nint, ns, nm, nmat, nnbrs, nlcx, nlcy, nlcz, nlc);时弹出“System.StackOverflowException”类型的未经处理的异常在 主界面.exe 中发生
请问怎么解决,我代码中也没有死循环呀
|
|