mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 14:09:28 +02:00
17 lines
314 B
ObjectPascal
17 lines
314 B
ObjectPascal
Program Example11;
|
|
|
|
Uses strings;
|
|
|
|
{ Program to demonstrate the StrCat function. }
|
|
|
|
Const P1 : PChar = 'This is a PChar String.';
|
|
|
|
Var P2 : PChar;
|
|
|
|
begin
|
|
P2:=StrAlloc (StrLen(P1)*2+1);
|
|
StrMove (P2,P1,StrLen(P1)+1); { P2=P1 }
|
|
StrCat (P2,P1); { Append P2 once more }
|
|
Writeln ('P2 : ',P2);
|
|
end.
|