L
lcyzxcvbnm
Unregistered / Unconfirmed
GUEST, unregistred user!
type
Tcodedetail = Record
subject : string[20];
author : string[10];
sort : string[10];
index : string[5];
ftime : string[10];//1981.05.23
//fileaddress :string[20];
tabloid : string[20];
end;
var
Form1: TForm1;
MyFile:File of Tcodedetail;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
var
typeFile :File of Tcodedetail;
onerecode:Tcodedetail;
begin
AssignFile(typeFile,'g:/typeFile.lcy');
Reset(typeFile);
Append(typeFile);!!!!!!!!!!!!!!!!这里出错了!!!!!
onerecode.subject:=edit1.Text;
onerecode.author:=edit2.Text;
onerecode.sort:=edit3.Text;
onerecode.index:=edit4.Text;
onerecode.ftime:=edit5.Text;
onerecode.tabloid:=memo1.Text;
Write(typeFile,onerecode);
CloseFile(typefile);
end;
[Error] Unit1.pas(76): Incompatible types
不知如何才能写入多个纪录
用ReWrite好似不能写入多个纪录..
大家教教我如何才能写入多个纪录...
Tcodedetail = Record
subject : string[20];
author : string[10];
sort : string[10];
index : string[5];
ftime : string[10];//1981.05.23
//fileaddress :string[20];
tabloid : string[20];
end;
var
Form1: TForm1;
MyFile:File of Tcodedetail;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
var
typeFile :File of Tcodedetail;
onerecode:Tcodedetail;
begin
AssignFile(typeFile,'g:/typeFile.lcy');
Reset(typeFile);
Append(typeFile);!!!!!!!!!!!!!!!!这里出错了!!!!!
onerecode.subject:=edit1.Text;
onerecode.author:=edit2.Text;
onerecode.sort:=edit3.Text;
onerecode.index:=edit4.Text;
onerecode.ftime:=edit5.Text;
onerecode.tabloid:=memo1.Text;
Write(typeFile,onerecode);
CloseFile(typefile);
end;
[Error] Unit1.pas(76): Incompatible types
不知如何才能写入多个纪录
用ReWrite好似不能写入多个纪录..
大家教教我如何才能写入多个纪录...