Re: EOF location?
- From: "Richard" <riplin@xxxxxxxxxxxx>
- Date: 29 May 2006 13:59:27 -0700
A single 0x1A (control-Z in ASCII) is used to indicate EOF,
That is only true if the particular program tests specifically for that
character. Any file can have Ctrl-Zs scattered through them and what
happens is entirely dependent on the program.
WordStar (yes I still have that) will stop reading (WS comes from
CP/M). TYPE will also stop (it, too, comes from CP/M via MS-DOS 1).
Notepad and most other editors will read it and show a blob of some
kind - and will read all the data beyond it.
In CP/M the file size was only recorded to the nearest 128 byte record
so software filled the remainder of the last record with at least one
x'1a' and stripped that off when reading. MS-DOS/Windows has never
needed that because it recorded the size in bytes, but because it is a
clone of CP/M it has followed that convention with some programs such
as command.com and type.
similar to EOT in POSIX environments.
Except that EOT is 'End of Transmission' and has no effect of files.
.
- Follow-Ups:
- Re: EOF location?
- From: Clever Monkey
- Re: EOF location?
- References:
- EOF location?
- From: HeyBub
- Re: EOF location?
- From: Pete Dashwood
- Re: EOF location?
- From: Clever Monkey
- EOF location?
- Prev by Date: Re: EOF location?
- Next by Date: Re: Is a career switch to the mainframe/cobol world responsible?
- Previous by thread: Re: EOF location?
- Next by thread: Re: EOF location?
- Index(es):
Relevant Pages
|