C
crossbannyli
Unregistered / Unconfirmed
GUEST, unregistred user!
{
xx:array[0..4] of double,程序运行时动态获得初始值
ss,sa:double
执行到schong(xx,ss,sa);
编译不能通过,提示:incompatible typs:'k' and 'array'
帮忙解决,谢谢
}
type
k=array[0..4] of double;
//---------------
procedure schong(kk:k;s,a:double);
//---------
procedure TForm1.schong(kk:k;s,a:double);//求冲程
var
temp1,temp2:single;//中间变量,转换
begin
temp1:=(xx[3]*xx[3]+xx[2]*xx[2]-Exp(ln(xx[1]+xx[0])*2))/(2.0*xx[2]*xx[3]);
temp2:=(xx[3]*xx[3]+xx[2]*xx[2]-Exp(ln(xx[1]-xx[0])*2))/(2.0*xx[2]*xx[3]);
fai1max:=arccos(temp1);
fai1min:=arccos(temp2);
ss:=(fai1max-fai1min)*ass;//冲程;
end;
//调用
schong(xx,ss,sa);
xx:array[0..4] of double,程序运行时动态获得初始值
ss,sa:double
执行到schong(xx,ss,sa);
编译不能通过,提示:incompatible typs:'k' and 'array'
帮忙解决,谢谢
}
type
k=array[0..4] of double;
//---------------
procedure schong(kk:k;s,a:double);
//---------
procedure TForm1.schong(kk:k;s,a:double);//求冲程
var
temp1,temp2:single;//中间变量,转换
begin
temp1:=(xx[3]*xx[3]+xx[2]*xx[2]-Exp(ln(xx[1]+xx[0])*2))/(2.0*xx[2]*xx[3]);
temp2:=(xx[3]*xx[3]+xx[2]*xx[2]-Exp(ln(xx[1]-xx[0])*2))/(2.0*xx[2]*xx[3]);
fai1max:=arccos(temp1);
fai1min:=arccos(temp2);
ss:=(fai1max-fai1min)*ass;//冲程;
end;
//调用
schong(xx,ss,sa);