
21.05.2011, 22:21
|
Прохожий
|
|
Регистрация: 21.05.2011
Сообщения: 1
Репутация: 10
|
|
incompatible types
PHP код:
Type mas=array[1..100,1..100] of real;
Type mass=array[0..1000] of real;
var
Form1: TForm1;
Dk:mas; pw,np:mass;
Fr, Fw: TextFile;
implementation
uses Unit2;
function Dinkoeef(pw,np:mass; n,m:integer; var Dk:mas):real; external 'dinkoeff.dll' index 10;
{$R *.dfm}
procedure TForm1.BitBtn3Click(Sender: TObject);
var
i,j,n,m:integer;
pwmin, pwmax, npmin, npmax, h1, h2: real;
begin
assignfile(fw,'a.txt');
rewrite(fw);
writeln(fw,strtofloat(Edit1.Text));
writeln(fw,strtofloat(Edit2.Text));
writeln(fw,strtofloat(Edit3.Text));
writeln(fw,strtofloat(Edit4.Text));
writeln(fw,strtofloat(Edit5.Text));
writeln(fw,strtofloat(Edit6.Text));
closefile(fw);
h1:=(pwmax-pwmin)/(n-1);
h2:=(npmax-npmin)/(m-1);
For i:=1 to m do begin Form1.StringGrid1.Cells[i,0]:=FloatToStrf(pwmin,fffixed,2,2);
pw[i]:=pwmin;
pwmin:=pwmin+h1;
end;
For j:=1 to n do begin Form1.StringGrid1.Cells[0,j]:=FloatToStrf(npmin,fffixed,2,2);
np[j]:=npmin;
npmin:=npmin+h2;
end;
Form1.StringGrid1.RowCount:=n+1;
Form1.StringGrid1.ColCount:=m+1;
Dinkoeef(pw,np,Dk);
For i:=1 to m do For j:=1 to n do begin Form1.StringGrid1.Cells[i,j]:=FloatToStrf(Dk[i+1,j+1],fffixed,7,4);
end;
form1.StringGrid1.Cells[0,0]:='2n/p\w/p';
end;
выдает ошибку Incompatible types 'mas' and 'integer'
|