try this:
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type
score=1..100;
pgrade=^grade;
grade=record
number :integer;
name :string[20];
maths :score;
chinese:score;
english:score;
end; TForm1 = class(TForm)
StringGrid1: TStringGrid;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Button2: TButton;
Button1: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type
score=1..100;
pgrade=^grade;
grade=record
number :integer;
name :string[20];
maths :score;
chinese:score;
english:score;
end; TForm1 = class(TForm)
StringGrid1: TStringGrid;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Button2: TButton;
Button1: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
TForm1 = class(TForm)
StringGrid1: TStringGrid;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Button2: TButton;
Button1: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;上面的部分是窗体类的定义的.里面是类的方法函数和属性以及成员变量下面是你自己的类型定义,与窗体类没有直接关系,两个不能交叉
type
score=1..100;
pgrade=^grade;
grade=record
number :integer;
name :string[20];
maths :score;
chinese:score;
english:score;
end;