Actually, EOF (0xFF) *is* part of a text file, and is the byte in an ASCII 
byte-stream that indicates end-of-file.  In the "old days" the bytes following 
the last-byte in a stream and the end of a storage block 
(sector/cluster/track/cylinder, what have you) were padded with 0xFF so you 
knew you were past the end-of-the-file when you were reading it.

Just "more modern" Operating Systems are capable of setting the file length 
more accurately than in the past. And "stream" processors now recognize 
"running out of data" as EOF.  Just because it is now thus does not mean it was 
always so. (And, of course, just because a "stream" has no more data to return 
does not necessarily mean that it is at end-of-file, merely that there is no 
more data to return *at the moment* -- perhaps the card reader is jammed or the 
paper-tape broke :) ).

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-----Original Message-----
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Peter Da Silva
>Sent: Friday, 26 January, 2018 07:30
>To: SQLite mailing list
>Subject: Re: [sqlite] UTF8 and NUL
>
>On 1/26/18, 8:24 AM, "sqlite-users on behalf of Gary R. Schmidt"
><sqlite-users-boun...@mailinglists.sqlite.org on behalf of
>g...@mcleod-schmidt.id.au> wrote:
>> But how would you differentiate EOF???  (Let me guess, 0.  :-) )
>
>End of file is not part of the contents of the file or a string. It's
>metadata.
>
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to