论文部分内容阅读
在编写应用软件时常常涉及到读写文本文件的操作,对于一般的纯文本文件可以很容易地实现,但对于用WPS及WINDOWS的书写器编辑的文件就比较棘手。读写WPS文件的方法已有不少介绍,我在这里介绍一种读写书写器文件的方法。 笔者通过对书写器文件的比较分析,基本弄清了它的存储格式,并编写了一个函数用来识别书写器文件。如果是普通的纯文本文件,则返回其文件名;如果是书写器格式的文件,则根据此文件生成一个纯文本格式的临时文件,并把这个临时文件的文件名作为函数的返回值返回。这样,程序运行
When writing application software, it often involves reading and writing text files, which can be easily implemented for plain text files. However, editing files with WPS and WINDOWS writers can be tricky. WPS file reading and writing methods have been introduced, I am here to introduce a way to read and write the writer file. The author through the comparative analysis of the document writer, the basic understanding of its storage format, and the preparation of a function used to identify the writer file. If it is an ordinary plain text file, its file name is returned; if it is a writer format file, a temporary file in plain text format is generated according to the file and the file name of the temporary file is returned as a function return value. In this way, the program is running