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

Uses strings;

{ Program to demonstrate the StrPCopy function. }

Const S = 'This is a normal string.';

Var P : Pchar;

begin
  p:=StrAlloc (length(S)+1);
  if StrPCopy (P,S)<>P then
    Writeln ('This is impossible !!')
  else
    writeln (P);
  StrDispose(P);  
end.