书中讲到要这样输入:
implementation
{$R *.dfm}
type
tlink=^note;
note=record
date:string[30];
next:tlink;
var
tre:tlink;这样输入不行
type
TForm1 = class(TForm)
tlink=^note;
note=record
date:string[30];
next:tlink;
.....
var
Form1: TForm1;
tre:tlink;
implementation
{$R *.dfm}在implementation {$R *.dfm}下输入又不可以有二个var
请问我应怎么写.
implementation
{$R *.dfm}
type
tlink=^note;
note=record
date:string[30];
next:tlink;
var
tre:tlink;这样输入不行
type
TForm1 = class(TForm)
tlink=^note;
note=record
date:string[30];
next:tlink;
.....
var
Form1: TForm1;
tre:tlink;
implementation
{$R *.dfm}在implementation {$R *.dfm}下输入又不可以有二个var
请问我应怎么写.
tlink=^note;
note=record
date:string[30];
next:tlink;
end; <-------- 你写掉了end
...
var tre:tlink;
var tre:tlink 可以在
1、implementation之前,为本单元的全局变量;
2、在单元函数中,为函数的局部变量。