[fpc-pascal] Seek to EOF of file of byte

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Sat Nov 18 21:27:37 CET 2017

On 18/11/17 19:30, Graeme Geldenhuys wrote:
> On 2017-11-18 15:44, Mark Morgan Lloyd wrote:> How should one do this?> 
> https://www.freepascal.org/docs-html/current/rtl/system/seekeof.html> 
> implies that it's only for text files, Seek(f, FileSize(f)) seems 
> excessive.
> Just curious, why would you consider the "old technology" instead of 
> using TFileStream (or any of the other TStream descendants).
> I'm actually busy converting some old apps that used "t: Text" style 
> coding, and replacing it with more modern Stream-style code, and it 
> works really well. Streams are so much more flexible.

With your propensity for "I wouldn't start from here" answers I'm 
surprised you're not on CIX :-)

Basically, because the program is being viewed critically by the ALGOL 
programmer whose code I'm converting, and a number of other people of a 
comparable generation and background. So while I'm using OO fairly 
heavily and threads where the architecture makes them appropriate ** I'm 
trying not to change stuff gratuitously.

** The original code tried to simulate up to 2x CPUs and up to 4x IOPs 
using a single thread. I'm trying to do it properly.

Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

More information about the fpc-pascal mailing list