.net - EOF marker when generating text files? -


When I am generating a text file program, I should finally put the ASCII EOF marker (decimal value 26) file ?

Does Net Programming Languages ​​Perform It Automatically?

^ z No reason for EOF > Marker is no longer (has not been long) - It is more than CP / M, which does not support the exact length in the file in the directory - File size was in reference to the number of 128 byte blocks, so non-128 You had to use an EOF character to finish a file on the byte border.

From the early versions of MS-DOS, CP / M (and Microsoft had major impact on CAP / M programs)

Your program should open text files with the appropriate attributes so that the OS And / or language runtime is a ^ Z if you come across a file that uses the conference but no need to write anymore.

A potential exception Is if you have a binary file , But want to have some text in it initially, then a ^ z , then your data if someone dumps it to the console, instead of extinguishing the trash, something wiser says. There are not all the reasons, but I have seen that rarely done.

From Wikipedia ():

The number of file size was specified as 128- Byte record (for disc areas on 8-inch drive directly) on disk Captured by Hail. Byte-exact file size was not normally supported way to specify. File current size was maintained in operating system files and file control block (FCB). Since many application programs (such as text editors) prefer to act as a sequence of characters rather than sequences of files as sequence of files, the conference text files are controlled by the control-Z character (ASCII SUB, hexadecimal 1a) Was finished with. Including determining the end of a text file, in which the terminal control-Z is detected to detect the final control of the file. It also meant that by inserting a control-Z character in the middle of the file, there was usually the effect of reducing the text content of the file.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -