To Koala,
Sorry,我一直没有时间编程,最近才拾起来。现程序已调通。但在运行时发生错误:
"Project M.exe raised exception class EAccess Violation with message 'Access
Violation at address 1000109F in module 'cdll.dll'. Write of address 00437000'
Process stopped,use Step or Run to Continue."
我的接口部分如下:
Delphi 部分
interface
.
.
.
var
d1,d2,n,f0,fn:real;
r,p,p0,t,h,tau,alpha,l,w:real;
stype:Integer;
procedure a(stype:Integer;d1,n,d2,fn,f0:real;var r,p,p0,t,h,tau,alpha,l,w:real);stdcall;
.
.
.
implementation
uses SysUtils, About;
{$R *.DFM}
procedure a;far;stdcall;external 'cdll.dll';
procedure TSDIAppForm.Button1Click(Sender: TObject);
begin
a(stype,d1,n,d2,fn,f0,r,p,p0,t,h,tau,alpha,l,w);
end;
c Fortran DLL 部分
subroutine a(stype,d1,n,d,delta,delta0,r,p,p0,t,h,tau,alpha,l
$,w)
!MS$Attributes DLLEXPORT,C::a
!MS$Attributes ALIAS :'a'::a
!MS$Attributes Reference::r,p,p0,t,h,tau,alpha,l,w
real d1,n,d,delta,delta0,n0,r,p,p0,t,h,tau,alpha,l,w
integer stype
请指出错误所在,并告知解决办法。
颜纯
2000.7.27.