[fpc-pascal] fpc trunk issue with StreamIO or TMemoryStream
luca at ventoso.org
Mon Oct 7 13:41:44 CEST 2019
I'm facing a strange issue, I don't know if it's StreamIO or
TMemoryStream. The following program, compiled with fpc
Free Pascal Compiler version 3.2.0-beta [2019/04/26] for i386
(I checked trunk and I don't see changes in streams or streamio)
prints 3 lines but they are empty!
If I remove the "stream.position:=0", or I use $H- (or line:shortstring)
or I avoid the RStream procedure (i.e I put what it does in the main
program) or I use fpc 3.0.4 it correctly prints
Does it ring any bell?
The stream.position:=0 is really strange, since it just calls seeks
which in turn only sets FPosition to 0 (and it was already 0!).
In my project I'm actually using a TMemoryStream, but it has the same issue.
Here's the test program
uses Classes, SysUtils, StreamIO;
while not eof(f) do
More information about the fpc-pascal