~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to fpcdocs/sysutex/ex46.pp

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Program Example46;
 
2
 
 
3
{ This program demonstrates the StrBufSize function }
 
4
{$H+}
 
5
 
 
6
Uses sysutils;
 
7
 
 
8
Const S  = 'Some nice string';
 
9
 
 
10
Var P : Pchar;
 
11
 
 
12
Begin
 
13
   P:=StrAlloc(Length(S)+1);
 
14
   StrPCopy(P,S);
 
15
   Write (P, ' has length ',length(S));
 
16
   Writeln (' and  buffer size ',StrBufSize(P));
 
17
   StrDispose(P);
 
18
End.
 
 
b'\\ No newline at end of file'