Share on Facebook Share on Twitter Email
Answers.com

End-of-file

 
Sci-Tech Dictionary: end of file
(¦end əv ′fīl)

(computer science) Termination or point of completion of a quantity of data; end of file marks are used to indicate this point. Automatic procedures to handle tapes when the end of an input or output tape is reached; a reflective spot, called a record mark, is placed on the physical end of the tape to signal the end.


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
Wikipedia: End-of-file
Top

In computing, end-of-file, commonly abbreviated EOF, is a condition in a computer operating system where no more data can be read from a data source. The data source is usually called a file or stream.

In the C Standard Library, file access and other I/O functions may return a value equal to the symbolic value (macro) EOF to indicate that an end-of-file condition has occurred. The actual value of EOF is a system-dependent negative number, commonly -1, which is guaranteed to be unequal to any valid character code.

In UNIX and AmigaDOS, an end-of-file indication can be sent from an interactive shell (console) by typing Ctrl+D (conventional standard); a program reading from stdin would then read an EOF. In Microsoft's DOS and Windows it is sent by pressing Ctrl+Z.

In certain cases when dealing with text files or reading data from a "character device", MS-DOS programs will act like the file ends when it encounters a Ctrl+Z byte. This was done for compatibility with CP/M and MSDOS 1.0, which could only measure the lengths of files in 128-byte blocks, and thus used the Ctrl+Z to indicate where in the middle of a block the text actually ended. MS-DOS 2.0 and all later versions can store the exact length of files, and no C libraries have ever translated this byte to an EOF value; the interpretation is left to the program.

In the ANSI X3.27-1969 magnetic tape standard, the end of file was indicated by a tape mark, which consisted of a gap of approximately 3.5 inches of tape followed by a single byte containing the character 13 (hex) for nine-track tapes and 17 (octal) for seven-track tapes. [1]. The end-of-tape, commonly abbreviated as EOT, was indicated by two tape marks. This was the standard used, for example, on IBM 360. The reflective strip used to announce impending physical end of tape was also called an EOT marker.

See also

References



 
 

 

Copyrights:

Sci-Tech Dictionary. McGraw-Hill Dictionary of Scientific and Technical Terms. Copyright © 2003, 1994, 1989, 1984, 1978, 1976, 1974 by McGraw-Hill Companies, Inc. All rights reserved.  Read more
Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "End-of-file" Read more