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

Peter Vreman peter at freepascal.org
Thu Oct 31 12:49:25 CET 2002


>> 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.
>

Test first if the program works with fpc 1.0.x. If it works then it's a
bug in 1.1.







More information about the fpc-pascal mailing list