~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcdocs/objectex/ex13.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Program ex13;
 
2
 
 
3
{
 
4
Program to demonstrate the TStream.ReadStr TStream.WriteStr functions
 
5
}
 
6
 
 
7
Uses objects;
 
8
 
 
9
Var P : PString;
 
10
    L : String;
 
11
    S : PStream;
 
12
 
 
13
begin
 
14
  L:='Constant string line';
 
15
  Writeln ('Writing to stream : "',L,'"');
 
16
  S:=New(PMemoryStream,Init(100,10));
 
17
  S^.WriteStr(@L);
 
18
  S^.Seek(0);
 
19
  P:=S^.ReadStr;
 
20
  L:=P^;
 
21
  DisposeStr(P);
 
22
  DisPose (S,Done);
 
23
  Writeln ('Read from stream : "',L,'"');
 
24
end.
 
 
b'\\ No newline at end of file'