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

{ Program to demonstrate the TStream.GetSize function }

Uses objects;

Var L : String;
    S : PStream;

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