summaryrefslogtreecommitdiff
path: root/fpcdocs/stringex/ex10.pp
blob: 24aeb7d9c6d513d5cc07f2be0d20febe05335f16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Program Example10;

Uses strings;

{ Program to demonstrate the StrMove function. }

Const P1 : PCHAR = 'This is a pchar string.';


Var P2 : Pchar;

begin
  P2:=StrAlloc(StrLen(P1)+1);
  StrMove (P2,P1,StrLen(P1)+1); { P2:=P1 }
  Writeln ('P2 = ',P2);
  StrDispose(P2);
end.