[fpc-pascal] TIOStream and .Position

Ċ½ilvinas Ledas zilvinas.ledas at dict.lt
Sat Dec 5 21:42:41 CET 2009


Hello all,

is this intended behavior or it is a bug that iostream.Position always 
returns -1?
In iostream unit I see that there is

<...>
  TIOStream = class(THandleStream)
  private
    FType : longint;
    FPos : Int64;
<...>

but if I use code like:

<...>
var
  iostream: TIOStream;
begin
  iostream := TIOStream.Create(iosInput);
  iostream.Position; // = -1
  iostream.Read(bufferin, 10);      
  iostream.Position; // = -1
end;
<...>

I don't get the right Position value...


Regards,
Zilvinas Ledas





More information about the fpc-pascal mailing list