Re: detecting end of a direct access file

Arjen Markus <arjen.markus895@xxxxxxxxx> wrote:

On 27 mrt, 05:12, tho...@xxxxxxxxxxxx wrote:
Is there a portable way to detect the end of a direct access file
while at the same time distinguishing it from other kinds of read

No, there is not. In fact, there is no portable way to guarantee that
such a read will even get an error at all. It might just suceed and
return bogus data. It is easy to imagine implentations and situations
where that would happen; I believe such might even have existed.
(Picture implementations that allocate such files in blocks that could
be bigger than the record size).

Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain