type
Tuserpostrecord=record
username,password:string[16];
userage:string[3];
usersex:Boolean;
usermail:string[30];
useraddress:string[50];
userqqnum:string[10];
end;
procedure Tuserdatafrm.Button1Click(Sender: TObject);
var
userpost1:Tuserpostrecord;
userpostfile:file of Tuserpostrecord;
userpostpathname:string;
//打开用户资料文件名
begin
assignfile(userpostfile,userpostpathname);
if fileexists(userpostpathname) then reset(userpostfile)
else
rewrite(userpostfile);
//确定用户名是否已经存在
while not eof(userpostfile) do
begin
read(userpostfile,userpost1);
end;
end;
找书看!