如何操作自己定义的文件类型的文件?(0分)

Z

zj_pht

Unregistered / Unconfirmed
GUEST, unregistred user!
我定义了如下文件类型:
type
THost_Info = record
Host_Label:string[20];
Host_IP :string[20];
User_Name :string[20];
PassWord :string[20];
CurrDir :string[20];
LocaDir :string[20];
end;
THost_File = File of THost_Info;
var
Host_File:THost_File

我如何操作Host_File?
 
没人知道吗
 
var
filerecord:THost_Info
Host_File:THost_File;
begin
assignfile(THost_File,'d:/test.dat');
reset(thost_file);
try
if not eof(thost_file) then
read(thost_file,filerecord);
finally
closefile(thost_file);
end;
 
具体字段值用filerecord.user_name就行
 
顶部