求助 pascal如何对txt文件进行读写?
pascal吧
全部回复
仅看楼主
level 11
开宝123 楼主
我想编一个程序,读入一些数据,将它们保存到一个txt文件中,下次运行的时候再调用。
求高手帮忙。
2014年01月22日 02点01分 1
level 12
对文件读写都是一样的 翻书
2014年01月22日 04点01分 2
level 14
assign
rewrite/reset
close
2014年01月22日 09点01分 3
level 6
pascal assign本来就是对文本进行读写的,
2014年02月03日 13点02分 4
level 11
assign(input,'c:\a.txt');
reset(input);
退出程序时
close(input);
这是读入
输出
assign(output,'c:\a.txt');
rewrite(output);
close(output);
此时readln与writeln均指向c:\a.txt
2014年02月05日 10点02分 5
1