summaryrefslogtreecommitdiff
path: root/fpcdocs/refex/ex48.pp
blob: ea33cf71ea78915982365afd5d9589c9ee559fd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Program Example48;

{ Program to demonstrate the Pos function. }

Var
  S : String;

begin
  S:='The first space in this sentence is at position : ';
  Writeln (S,pos(' ',S));
  S:='The last letter of the alphabet doesn''t appear in this sentence ';
  If (Pos ('Z',S)=0) and (Pos('z',S)=0) then
    Writeln (S);
end.