使用类型文件
TPersonRec = record
FirstName:String[20];
LastName:String[20];
Age:Integer;
end;var
Person: TPersonRec;
DataFile:File of TPersonRec;
begin
AssginFile(DataFile,'Personfile.dat');
Reset(DataFile);
try
if not Eof(DataFile) then
read(DataFile,Person);
finally
CloseFile(DataFile);
end;
end;
这样就读出了一条记录。
TPersonRec = record
FirstName:String[20];
LastName:String[20];
Age:Integer;
end;var
Person: TPersonRec;
DataFile:File of TPersonRec;
begin
AssginFile(DataFile,'Personfile.dat');
Reset(DataFile);
try
if not Eof(DataFile) then
read(DataFile,Person);
finally
CloseFile(DataFile);
end;
end;
这样就读出了一条记录。
解决方案 »
- delphi编程群号:16147100,群名:软件特工队。欢迎各位有编程爱好者共同交流。
- 功能模块按bpl编译的问题
- Eh grid 5.2怎么才能点标题排序?
- 请问版主大人,如何清空专家分。
- 程序员们都有电脑,却无二手论坛:另,购二手笔记本电脑,价位在7000以下
- 在xe5的时候 直接可以开发手机怎么到xe6就不行了 ,还是我安装有问题。
- 请教各位:CreateWindowStation/CreateDesktop为什么会出错?
- 请教一个查询问题
- 关于InterBase C/S 设置问题
- 控制光驱
- 如何将Cardinal类型转换成string? 100分相送!
- 一个困扰我很久的问题,有难度,大家多帮忙,zswang帮忙呀,多谢了!!分不够还有!!
to wzsswz:另外警告你不要再次回复//倒份嫌疑//因为你们的注册名都有“wzs”
http://www.csdn.net/Expert/TopicView1.asp?id=778352
http://www.csdn.net/Expert/TopicView1.asp?id=786648
http://www.csdn.net/Expert/TopicView1.asp?id=786651