-> The End-Of-File character CHR$(26) is a left over from CP/M and early
-> DOS programs. QuickBasic tries to stay compatible by observing it
-> for text based files. Some programs still put an EOF character at
-> the end of text files. Most newer programs do not. They go by the
-> length stored in the directory entry for the file.
->
-> The EOF character is ignored when opening a file for BINARY or
-> RANDOM. If CHR$(26) and some other lower 32 control codes appear
-> inside a file, it's not intended for sequential text access by
-> opening the file for INPUT.
Sometimes, I despair of PC-DOS! No sensible system would use CTL-Z
(CHR$(26)) or any other ASCII character to indicate EOF. It was not
given that significance in the original ASCII, and has never had that
significance in the other DOSes with which I am familiar - even those
which are older than PC-DOS. In any reasonable system, EOF is indicated
by a pattern of bits which is different from those that represent all
ASCII characters, and therefore *cannot* be put within a file.
Daft, that's what it is!
dow
--- PCBoard (R) v15.3 (OS/2) 5
---------------
* Origin: FidoNet: CAP/CANADA Support BBS : 416 287-0234 (1:250/710)
|