home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / objectex / ex12.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  349 b   |  17 lines

  1. Program ex12;
  2.  
  3. { Program to demonstrate the TStream.GetSize function }
  4.  
  5. Uses objects;
  6.  
  7. Var L : String;
  8.     S : PStream;
  9.     
  10. begin
  11.   L:='Some kind of string';
  12.   S:=New(PMemoryStream,Init(100,10));
  13.   Writeln ('Stream size before write: ',S^.GetSize);
  14.   S^.WriteStr(@L);
  15.   Writeln ('Stream size after write : ',S^.GetSize);
  16.   Dispose(S,Done);
  17. end.