Delphi中读取文本文件的方法(实例一)
摘要:1 procedure TForm1.BtnReadClick(Sender: TObject); 2 var 3 txtFile: TextFile; 4 s: String[14]; //读取定长的字符串,这样的话就可以将列分开 5 i: Integer; 6 begin 7 //MyTxtFile.txt 8 Memo1.Lines.Clear; 9 AssignFile(txtFile,'MyTxtFile.txt');10 Reset(txtFile); //以只读方式打开文件11 try12 while not EOF(txtFile) d...
阅读全文
posted @ 2013-01-01 15:48

浙公网安备 33010602011771号