summaryrefslogtreecommitdiff
path: root/fpcdocs/objectex/ex11.pp
blob: 8632004d4a5c12290227aeeb04556ad905852525 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Program ex11;

{ Program to demonstrate the TStream.GetPos function }

Uses objects;

Var L : String;
    S : PStream;

begin
  L:='Some kind of string';
  S:=New(PMemoryStream,Init(100,10));
  Writeln ('Stream position before write: ',S^.GetPos);
  S^.WriteStr(@L);
  Writeln ('Stream position after write : ',S^.GetPos);
  Dispose(S,Done);
end.