RSS订阅 | 匿名投稿
您的位置:网站首页 > 文件 > 正文

Delphi函数AssignFile使用

作者:admin 来源: 日期:2011/8/11 10:02:48 人气: 标签:

 procedure TForm1.Button1Click(Sender: TObject);
var
F:file of char ;
S:array[1..11] of char;
i:integer;
begin
if OpenDialog1.Execute then { Display Open dialog box }
begin
AssignFile(F, OpenDialog1.FileName); { File selected in dialog }
Reset(F);
Seek(F,16);
for i:=1 to 11 do
Read(F, S[i]); { Read first line of file }
Edit1.Text := S;
for i:=1 to 11 do
Write(F,S[i]);
CloseFile(F);
end;
end;



读完这篇文章后,您心情如何?
0
0
0
0
0
0
0
0
本文网址: