Can the last record in a direct access file be shorter than the ?record length?

Can the last record in a direct access file be shorter than the ?record length?

Post by glen herrm » Thu, 05 Feb 2009 03:18:56



That is interesting. As I said before, PDF puts the important
information at the end of the file, even though one would presume
files are read more often than they are written. Assuming it
is easier to read the end first than to write the beginning last,
that makes some sense.

It is a little complicated because there might be padding at the
end, for instance filling up the last block. As well as I remember,
you position to the end and then slowly back up looking for a specific
marker word. How hard is that to do with Fortran stream I/O.
(I believe it is designed around C fseek() operations.)

-- glen
 
 
 

Can the last record in a direct access file be shorter than the ?record length?

Post by nospa » Thu, 05 Feb 2009 05:17:51


Since a significant design criterion for Fortran stream I/O was
compatibility with C, well... I think you can fill in the conclusion.

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