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

« back to all changes in this revision

Viewing changes to docs/strutex/ex2.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
 
{$mode objfpc}
2
 
{$h+}
3
 
Program testp;
4
 
 
5
 
uses sysutils,strutils;
6
 
 
7
 
Const
8
 
  Count = 10000000;
9
 
  Delims = [' ','.'];
10
 
Var
11
 
  S,T : String;
12
 
  I,N : Integer;
13
 
 
14
 
begin
15
 
  S:='THE CAT WAS NEVER SMART ENOUGH TO CATCH THIS FAST LITTLE MOUSE.';
16
 
  For I:=1 to 8 do
17
 
    Write('1234567890');
18
 
  Writeln;
19
 
  Writeln(S);
20
 
  For I:=1 to WordCount(S,Delims) do
21
 
    begin
22
 
    T:=ExtractWordPos(I,S,Delims,N);
23
 
    Writeln('Word ',I:2,' starts at ',N:2,'(',WordPosition(I,S,Delims):2,') : ',T);
24
 
    end;
25
 
end.                                                
 
 
b'\\ No newline at end of file'