还是不行,一样错误
郁闷
和谢谢你尽力帮我啊,到时后我没完的另外的100分给你,意思意思
全部的代码:
unit Unit4;
interface
uses
math,Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,StdCtrls;
type
TForm4 = class(TForm)
private
{ Private declarations }
public
{定义公共常量和变量 }
hand:array of double;//定义获取四杆机构杆件基本尺寸数组
handle_R:double;
handle_P:double;
handle_C:double;
handle_A:double;
handle_I:double;
handle_HG:double;
handle_K:double;
procedure access(hand:array of double); //定义获取四杆机构杆件基本尺寸函数
end;
var
Form4: TForm4;
implementation
uses Unit1;
procedure TForm4.access(hand:array of double);
var
i,k,n:integer;
begin
n:=Form1.ComponentCount;
k:=0;
for i:=0 to n-1 do
begin
if (Form1.components is TEdit ) then
begin
hand[k]:=strtofloat(Form1.TEdit(components).Text);
k:=k+1;
end;
end;
end;
{$R *.dfm}
end.