[fpc-pascal]TFileStream.Seek Bug in 1.1 ??

Michael Van Canneyt michael.vancanneyt at wisa.be
Thu Oct 31 13:05:59 CET 2002


On Thu, 31 Oct 2002 memsom at interalpha.co.uk wrote:

> > program test_stream;
> >
> > uses Classes;
> >
> > var
> >   Stream: TStream;
> > begin
> >   Stream := TFileStream.Create('test_stream.pas', fmOpenRead);
> >   WriteLn(Stream.Position);
> >   Stream.Free;
> > end.
>
> This works in Delphi 5 Sp2. I wonder if the file is 'locked' by the OS? Which
> OS are you using, sorry I forgot to look. Try opening a different file.
> Try 'fmCreate' a new file. If that works, it could be the OS locking the file.

No, there IS a bug in the compiler which makes this bomb out. It has
been discovered by someone else as well.

Michael.





More information about the fpc-pascal mailing list